From 64c91f9e0a11f13e4c588163c2595940214e94d9 Mon Sep 17 00:00:00 2001 From: nmemmert <67961292+nmemmert@users.noreply.github.com> Date: Tue, 20 Oct 2026 15:30:30 -0400 Subject: [PATCH] Search: hand the question to Duck.ai or DuckDuckGo Both refuse to be framed and Duck.ai has no public API, so Search shows "Ask Duck.ai" and "Search the web" buttons that open a new tab with the query pre-filled. Co-Authored-By: Claude Sonnet 5.5 --- public/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/app.js b/public/app.js index 8962141..cb0f448 100644 --- a/public/app.js +++ b/public/app.js @@ -194,10 +194,14 @@ async function walkSearch(repos, term) { // ---- Search: Seafile files + libraries and Plex music, all best-effort (a missing backend never blocks the others) function viewSearch() { $('#view').innerHTML = `

Search

+
`; const q = $('#q'); q.focus(); let timer, seq = 0; - q.oninput = () => { clearTimeout(timer); timer = setTimeout(() => runSearch(q.value.trim(), ++seq), 350); }; + // Duck.ai and DuckDuckGo refuse to be shown inside other apps, so these hand the question over in a new tab. + const webLinks = () => { const t = encodeURIComponent(q.value.trim()); $('#duckai').href = 'https://duck.ai/' + (t ? '?q=' + t : ''); $('#ddg').href = 'https://duckduckgo.com/' + (t ? '?q=' + t : ''); }; + q.oninput = () => { webLinks(); clearTimeout(timer); timer = setTimeout(() => runSearch(q.value.trim(), ++seq), 350); }; async function runSearch(term, mySeq) { const res = $('#res'); if (term.length < 2) { res.innerHTML = ''; return; }