diff --git a/home-preload.js b/home-preload.js index 7d0202f..aa3b2c9 100644 --- a/home-preload.js +++ b/home-preload.js @@ -10,6 +10,10 @@ contextBridge.exposeInMainWorld("home", { setCards: (cards) => ipcRenderer.invoke("home-cards-set", cards), resetCards: () => ipcRenderer.invoke("home-cards-reset"), navigate: (url) => ipcRenderer.invoke("navigate", url), + // Current default search engine — used to populate the search box + // placeholder with the actual engine name (e.g. "Search the web with + // Startpage") instead of hardcoding DuckDuckGo. + getEngines: () => ipcRenderer.invoke("search-engines"), // Main pushes an updated list here after a successful remote refresh // (only when the user has not customised locally). home.html re-renders. onCards: (cb) => ipcRenderer.on("home-cards", (_e, list) => cb(list)), diff --git a/home.html b/home.html index e4f86ea..6b7aba4 100644 --- a/home.html +++ b/home.html @@ -118,7 +118,7 @@
A browser that follows the thread. Names that live on the Bitcoin Cash chain.
Tip: type a .bch name in the address bar above to open a decentralized site.
@@ -165,8 +165,23 @@ e.preventDefault(); const q = $("q").value.trim(); if (!q) return; if (window.home && window.home.navigate) window.home.navigate(q); - else window.location.href = "https://duckduckgo.com/?q=" + encodeURIComponent(q); + // Fallback if the preload didn't bind (shouldn't happen). Startpage + // over DuckDuckGo since that's Theseus's own default engine now. + else window.location.href = "https://www.startpage.com/do/search?q=" + encodeURIComponent(q); }); + // Populate placeholder with the user's current default engine name so + // "Search the web with