Skip to content

Commit babe807

Browse files
committed
Set NeoSearch as the default search engine
1 parent 65c3a9f commit babe807

8 files changed

Lines changed: 26 additions & 22 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Linux phones (Librem 5 / PinePhone / Ubuntu Touch). See
4747
4848
## What you get today
4949

50-
- **De-googled new tab** — TronBrowser page, **Xprivo** as the default private
50+
- **De-googled new tab** — TronBrowser page, **NeoSearch** as the default private
5151
search (no Google in the omnibox; DuckDuckGo available as an alternative), quick links.
5252
- **RSS reader** on the new tab — seeded from your OPML; add/remove feeds and
5353
**import/export OPML** in Settings.

apps/desktop/extensions/ai-sidebar/newtab.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
<button type="button" id="mode-web" class="mode active" aria-selected="true">Web</button>
2222
<button type="button" id="mode-ai" class="mode" aria-selected="false">AI</button>
2323
</div>
24-
<input id="q" type="text" placeholder="Search Xprivo" autocomplete="off" autofocus />
24+
<input id="q" type="text" placeholder="Search NeoSearch" autocomplete="off" autofocus />
2525
</form>
2626

2727
<nav class="links">
28+
<a href="https://neosearch.org">NeoSearch</a>
2829
<a href="https://www.xprivo.com">Xprivo</a>
2930
<a href="https://duckduckgo.com">DuckDuckGo</a>
3031
<a href="https://altpower.app">Altpower</a>

apps/desktop/extensions/ai-sidebar/newtab.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,32 @@ const DEFAULT_TICKERS = 'SPY, AAPL, NVDA, BTC-USD';
1111
const DEFAULT_LEAGUES = 'nfl, nba';
1212
const splitList = (s) => String(s || '').split(',').map((x) => x.trim()).filter(Boolean);
1313

14-
// --- Search: Web (Xprivo by default, DuckDuckGo alternative) or AI (sidebar) ---
14+
// --- Search: Web (NeoSearch by default) or AI (sidebar) ---
1515
const SEARCH_ENGINES = {
16+
neosearch: { name: 'NeoSearch', url: 'https://neosearch.org/?q=' },
1617
xprivo: { name: 'Xprivo', url: 'https://www.xprivo.com/search/?q=' },
1718
ddg: { name: 'DuckDuckGo', url: 'https://duckduckgo.com/?q=' },
1819
// Altpower is a Google Programmable Search — query lives in the URL fragment.
1920
altpower: { name: 'Altpower', url: 'https://altpower.app/#open-source&gsc.tab=0&gsc.q=', suffix: '&gsc.sort=' },
2021
oxiverse: { name: 'Oxiverse', url: 'https://search.oxiverse.com/?q=', suffix: '&tab=web' },
2122
};
2223
let searchMode = 'web';
23-
let searchEngine = 'xprivo';
24+
let searchEngine = 'neosearch';
2425

2526
function setMode(mode) {
2627
searchMode = mode;
2728
el('mode-web').classList.toggle('active', mode === 'web');
2829
el('mode-ai').classList.toggle('active', mode === 'ai');
2930
el('mode-web').setAttribute('aria-selected', mode === 'web');
3031
el('mode-ai').setAttribute('aria-selected', mode === 'ai');
31-
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.xprivo;
32+
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.neosearch;
3233
el('q').placeholder = mode === 'ai' ? 'Ask AI anything…' : `Search ${eng.name}…`;
3334
el('q').focus();
3435
}
3536
el('mode-web').addEventListener('click', () => setMode('web'));
3637
el('mode-ai').addEventListener('click', () => setMode('ai'));
3738

38-
// Load the chosen web search engine (default Xprivo).
39+
// Load the chosen web search engine (default NeoSearch).
3940
chrome.storage.local.get('searchEngine').then(({ searchEngine: se }) => {
4041
if (se && SEARCH_ENGINES[se]) searchEngine = se;
4142
if (searchMode === 'web') setMode('web');
@@ -51,7 +52,7 @@ el('search').addEventListener('submit', async (e) => {
5152
chrome.runtime.sendMessage({ type: 'open-sidepanel' });
5253
el('q').value = '';
5354
} else {
54-
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.xprivo;
55+
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.neosearch;
5556
location.href = eng.url + encodeURIComponent(q) + (eng.suffix || '');
5657
}
5758
});

apps/desktop/extensions/ai-sidebar/options.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,13 @@ <h2>bittorrented.com — Live TV, Radio &amp; Podcasts</h2>
105105
<span id="btrMsg" class="saved"></span>
106106

107107
<h2>Search</h2>
108-
<p class="hint">Default search engine for the new-tab search box. Xprivo is the
109-
private default; DuckDuckGo is available as an alternative. (The omnibox default
108+
<p class="hint">Default search engine for the new-tab search box. NeoSearch is the
109+
private default; Xprivo, DuckDuckGo, and others are available as alternatives. (The omnibox default
110110
is set separately in <code>chrome://settings/search</code>.)</p>
111111
<label for="searchEngine">New-tab search engine</label>
112112
<select id="searchEngine">
113-
<option value="xprivo">Xprivo (private, default)</option>
113+
<option value="neosearch">NeoSearch (private, default)</option>
114+
<option value="xprivo">Xprivo (private)</option>
114115
<option value="ddg">DuckDuckGo</option>
115116
<option value="altpower">Altpower</option>
116117
<option value="oxiverse">Oxiverse</option>

apps/desktop/extensions/ai-sidebar/settings-sections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function mountSettingsSections({ store, el, flash }) {
4242
const cur = await store.get(['feeds', 'tickers', 'leagues', 'searchEngine']);
4343

4444
// Populate current values (on every mount, e.g. after a cloud pull).
45-
if (el('searchEngine')) el('searchEngine').value = cur.searchEngine || 'xprivo';
45+
if (el('searchEngine')) el('searchEngine').value = cur.searchEngine || 'neosearch';
4646
if (el('tickers')) el('tickers').value = cur.tickers ?? '';
4747
if (el('leagues')) el('leagues').value = cur.leagues ?? '';
4848
feeds = Array.isArray(cur.feeds) && cur.feeds.length ? cur.feeds.slice() : DEFAULT_FEEDS.slice();

apps/desktop/launcher/tronbrowser

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,9 @@ if flag not in exp:
186186
PY
187187
fi
188188

189-
# Default the omnibox to Xprivo. Force this ONCE per profile (older builds
190-
# defaulted to DuckDuckGo, and seeding-only-when-empty left existing profiles on
191-
# DDG) via a marker file, then respect the user's chrome://settings/search choice.
192-
if command -v python3 >/dev/null 2>&1 && [ ! -f "$DATA/.tron-search-xprivo" ]; then
189+
# Default the omnibox to NeoSearch once per profile, then respect the user's
190+
# chrome://settings/search choice.
191+
if command -v python3 >/dev/null 2>&1 && [ ! -f "$DATA/.tron-search-neosearch" ]; then
193192
TB_PREFS="$DATA/Default/Preferences" python3 - <<'PY' 2>/dev/null || true
194193
import json, os
195194
p = os.environ["TB_PREFS"]
@@ -199,15 +198,16 @@ try:
199198
except Exception:
200199
d = {}
201200
d.setdefault("default_search_provider_data", {})["template_url_data"] = {
202-
"short_name": "Xprivo",
203-
"keyword": "xprivo.com",
204-
"url": "https://www.xprivo.com/search/?q={searchTerms}",
205-
"favicon_url": "https://www.xprivo.com/favicon.ico",
201+
"short_name": "NeoSearch",
202+
"keyword": "neosearch.org",
203+
"url": "https://neosearch.org/?q={searchTerms}",
204+
"suggestions_url": "https://neosearch.org/suggestions?q={searchTerms}",
205+
"favicon_url": "https://neosearch.org/favicon-32x32.png",
206206
"safe_for_autoreplace": False,
207207
}
208208
json.dump(d, open(p, "w"))
209209
PY
210-
mkdir -p "$DATA"; : > "$DATA/.tron-search-xprivo"
210+
mkdir -p "$DATA"; : > "$DATA/.tron-search-neosearch"
211211
fi
212212

213213
# Show the feed (ai-sidebar New Tab page) on startup. We can't pass a startup URL —

apps/web/public/settings-sections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function mountSettingsSections({ store, el, flash }) {
4242
const cur = await store.get(['feeds', 'tickers', 'leagues', 'searchEngine']);
4343

4444
// Populate current values (on every mount, e.g. after a cloud pull).
45-
if (el('searchEngine')) el('searchEngine').value = cur.searchEngine || 'xprivo';
45+
if (el('searchEngine')) el('searchEngine').value = cur.searchEngine || 'neosearch';
4646
if (el('tickers')) el('tickers').value = cur.tickers ?? '';
4747
if (el('leagues')) el('leagues').value = cur.leagues ?? '';
4848
feeds = Array.isArray(cur.feeds) && cur.feeds.length ? cur.feeds.slice() : DEFAULT_FEEDS.slice();

apps/web/public/settings.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ <h2>Search</h2>
8080
<p class="hint">Default search engine for the new-tab search box.</p>
8181
<label for="searchEngine">New-tab search engine</label>
8282
<select id="searchEngine">
83-
<option value="xprivo">Xprivo (private, default)</option>
83+
<option value="neosearch">NeoSearch (private, default)</option>
84+
<option value="xprivo">Xprivo (private)</option>
8485
<option value="ddg">DuckDuckGo</option>
8586
<option value="altpower">Altpower</option>
8687
<option value="oxiverse">Oxiverse</option>

0 commit comments

Comments
 (0)