Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ coverage/
.expo/
*.orig

# Runtime symlink created by launcher setup (not source)
apps/desktop/launcher/extensions

# Native project dirs generated by `expo prebuild` (not manually customized)
apps/mobile/android/
apps/mobile/ios/

# Bundled at build time (fetched, GPL — not vendored)
apps/desktop/extensions/ublock-origin/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Linux phones (Librem 5 / PinePhone / Ubuntu Touch). See

## What you get today

- **De-googled new tab** — TronBrowser page, **Xprivo** as the default private
- **De-googled new tab** — TronBrowser page, **NeoSearch** as the default private
search (no Google in the omnibox; DuckDuckGo available as an alternative), quick links.
- **RSS reader** on the new tab — seeded from your OPML; add/remove feeds and
**import/export OPML** in Settings.
Expand Down
3 changes: 2 additions & 1 deletion apps/desktop/extensions/ai-sidebar/newtab.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
<button type="button" id="mode-web" class="mode active" aria-selected="true">Web</button>
<button type="button" id="mode-ai" class="mode" aria-selected="false">AI</button>
</div>
<input id="q" type="text" placeholder="Search Xprivo…" autocomplete="off" autofocus />
<input id="q" type="text" placeholder="Search NeoSearch…" autocomplete="off" autofocus />
</form>

<nav class="links">
<a href="https://neosearch.org">NeoSearch</a>
<a href="https://www.xprivo.com">Xprivo</a>
<a href="https://duckduckgo.com">DuckDuckGo</a>
<a href="https://altpower.app">Altpower</a>
Expand Down
11 changes: 6 additions & 5 deletions apps/desktop/extensions/ai-sidebar/newtab.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,32 @@ const DEFAULT_TICKERS = 'SPY, AAPL, NVDA, BTC-USD';
const DEFAULT_LEAGUES = 'nfl, nba';
const splitList = (s) => String(s || '').split(',').map((x) => x.trim()).filter(Boolean);

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

function setMode(mode) {
searchMode = mode;
el('mode-web').classList.toggle('active', mode === 'web');
el('mode-ai').classList.toggle('active', mode === 'ai');
el('mode-web').setAttribute('aria-selected', mode === 'web');
el('mode-ai').setAttribute('aria-selected', mode === 'ai');
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.xprivo;
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.neosearch;
el('q').placeholder = mode === 'ai' ? 'Ask AI anything…' : `Search ${eng.name}…`;
el('q').focus();
}
el('mode-web').addEventListener('click', () => setMode('web'));
el('mode-ai').addEventListener('click', () => setMode('ai'));

// Load the chosen web search engine (default Xprivo).
// Load the chosen web search engine (default NeoSearch).
chrome.storage.local.get('searchEngine').then(({ searchEngine: se }) => {
if (se && SEARCH_ENGINES[se]) searchEngine = se;
if (searchMode === 'web') setMode('web');
Expand All @@ -51,7 +52,7 @@ el('search').addEventListener('submit', async (e) => {
chrome.runtime.sendMessage({ type: 'open-sidepanel' });
el('q').value = '';
} else {
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.xprivo;
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.neosearch;
location.href = eng.url + encodeURIComponent(q) + (eng.suffix || '');
}
});
Expand Down
7 changes: 4 additions & 3 deletions apps/desktop/extensions/ai-sidebar/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ <h2>bittorrented.com — Live TV, Radio &amp; Podcasts</h2>
<span id="btrMsg" class="saved"></span>

<h2>Search</h2>
<p class="hint">Default search engine for the new-tab search box. Xprivo is the
private default; DuckDuckGo is available as an alternative. (The omnibox default
<p class="hint">Default search engine for the new-tab search box. NeoSearch is the
private default; Xprivo, DuckDuckGo, and others are available as alternatives. (The omnibox default
is set separately in <code>chrome://settings/search</code>.)</p>
<label for="searchEngine">New-tab search engine</label>
<select id="searchEngine">
<option value="xprivo">Xprivo (private, default)</option>
<option value="neosearch">NeoSearch (private, default)</option>
<option value="xprivo">Xprivo (private)</option>
<option value="ddg">DuckDuckGo</option>
<option value="altpower">Altpower</option>
<option value="oxiverse">Oxiverse</option>
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/extensions/ai-sidebar/settings-sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function mountSettingsSections({ store, el, flash }) {
const cur = await store.get(['feeds', 'tickers', 'leagues', 'searchEngine']);

// Populate current values (on every mount, e.g. after a cloud pull).
if (el('searchEngine')) el('searchEngine').value = cur.searchEngine || 'xprivo';
if (el('searchEngine')) el('searchEngine').value = cur.searchEngine || 'neosearch';
if (el('tickers')) el('tickers').value = cur.tickers ?? '';
if (el('leagues')) el('leagues').value = cur.leagues ?? '';
feeds = Array.isArray(cur.feeds) && cur.feeds.length ? cur.feeds.slice() : DEFAULT_FEEDS.slice();
Expand Down
18 changes: 9 additions & 9 deletions apps/desktop/launcher/tronbrowser
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,9 @@ if flag not in exp:
PY
fi

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

# Show the feed (ai-sidebar New Tab page) on startup. We can't pass a startup URL —
Expand Down
2 changes: 1 addition & 1 deletion apps/web/public/settings-sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function mountSettingsSections({ store, el, flash }) {
const cur = await store.get(['feeds', 'tickers', 'leagues', 'searchEngine']);

// Populate current values (on every mount, e.g. after a cloud pull).
if (el('searchEngine')) el('searchEngine').value = cur.searchEngine || 'xprivo';
if (el('searchEngine')) el('searchEngine').value = cur.searchEngine || 'neosearch';
if (el('tickers')) el('tickers').value = cur.tickers ?? '';
if (el('leagues')) el('leagues').value = cur.leagues ?? '';
feeds = Array.isArray(cur.feeds) && cur.feeds.length ? cur.feeds.slice() : DEFAULT_FEEDS.slice();
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ <h2>Search</h2>
<p class="hint">Default search engine for the new-tab search box.</p>
<label for="searchEngine">New-tab search engine</label>
<select id="searchEngine">
<option value="xprivo">Xprivo (private, default)</option>
<option value="neosearch">NeoSearch (private, default)</option>
<option value="xprivo">Xprivo (private)</option>
<option value="ddg">DuckDuckGo</option>
<option value="altpower">Altpower</option>
<option value="oxiverse">Oxiverse</option>
Expand Down
Loading