feat(ui): make favicons user-configurable, off by default
- Add favicon service preference: None (default), Google, DuckDuckGo - result_item.html: remove hardcoded Google favicon src, defer to JS - applyFavicon() reads data-domain attr and sets src or display:none - Privacy-by-default: users must explicitly opt in to any favicon service - Add favicon selector to both the settings panel and preferences page
This commit is contained in:
parent
ba06582218
commit
7ea50d3123
3 changed files with 60 additions and 3 deletions
|
|
@ -69,6 +69,17 @@
|
|||
<option value="2">Strict</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="pref-row">
|
||||
<div class="pref-row-info">
|
||||
<label>Favicon Service</label>
|
||||
<p class="pref-desc">Fetch favicons for result URLs. "None" is most private.</p>
|
||||
</div>
|
||||
<select name="favicon" id="pref-favicon">
|
||||
<option value="none" selected>None</option>
|
||||
<option value="google">Google</option>
|
||||
<option value="duckduckgo">DuckDuckGo</option>
|
||||
</select>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="pref-section">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<a href="{{.URL}}" target="_blank" rel="noopener noreferrer">{{.SafeTitle}}</a>
|
||||
</div>
|
||||
<div class="result_url">
|
||||
<img class="result-favicon" src="https://www.google.com/s2/favicons?domain={{.URL | urlquery}}&sz=32" alt="" loading="lazy" onerror="this.style.display='none'">
|
||||
<img class="result-favicon" data-domain="{{.URL}}" src="" alt="" loading="lazy" style="display:none">
|
||||
<a href="{{.URL}}" target="_blank" rel="noopener noreferrer">{{.URL}}</a>
|
||||
<span class="engine-badge" data-engine="{{.Engine}}">{{.Engine}}</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue