Skip to content

Commit ffaa672

Browse files
committed
v0.1.33: default search to Xprivo, DuckDuckGo as alternative
- omnibox default -> Xprivo (https://www.xprivo.com/search/?q=) in the extension manifest search_provider + launcher Default/Preferences pre-seed - new tab: search box defaults to Xprivo; new Settings 'Search engine' picker (Xprivo default | DuckDuckGo), synced; quick-links list Xprivo first then DDG
1 parent b85f213 commit ffaa672

31 files changed

Lines changed: 78 additions & 45 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Linux phones (Librem 5 / PinePhone / Ubuntu Touch). See
3939
4040
## What you get today
4141

42-
- **De-googled new tab** — T-logo TronBrowser page, **DuckDuckGo** as the default
43-
search (no Google in the omnibox), quick links.
42+
- **De-googled new tab** — TronBrowser page, **Xprivo** as the default private
43+
search (no Google in the omnibox; DuckDuckGo available as an alternative), quick links.
4444
- **RSS reader** on the new tab — seeded from your OPML; add/remove feeds and
4545
**import/export OPML** in Settings.
4646
- **AI sidebar (bring your own keys)** — Anthropic, OpenAI, Google/Gemini,

‎apps/desktop/extensions/ai-sidebar/manifest.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"manifest_version": 3,
33
"name": "TronBrowser",
4-
"version": "0.1.32",
5-
"description": "TronBrowser — privacy-first, AI-native. Branded new tab, DuckDuckGo search, CoinPay login, and a bring-your-own-keys AI sidebar.",
4+
"version": "0.1.33",
5+
"description": "TronBrowser — privacy-first, AI-native. Branded new tab, private search, CoinPay login, and a bring-your-own-keys AI sidebar.",
66
"icons": {
77
"16": "icons/icon-16.png",
88
"32": "icons/icon-32.png",
@@ -65,10 +65,10 @@
6565
},
6666
"chrome_settings_overrides": {
6767
"search_provider": {
68-
"name": "DuckDuckGo",
69-
"keyword": "ddg",
70-
"search_url": "https://duckduckgo.com/?q={searchTerms}",
71-
"favicon_url": "https://duckduckgo.com/favicon.ico",
68+
"name": "Xprivo",
69+
"keyword": "xprivo",
70+
"search_url": "https://www.xprivo.com/search/?q={searchTerms}",
71+
"favicon_url": "https://www.xprivo.com/favicon.ico",
7272
"encoding": "UTF-8",
7373
"is_default": true
7474
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ <h1 class="brand">Tron<span>Browser</span></h1>
2323
<button type="button" id="mode-web" class="mode active" aria-selected="true">Web</button>
2424
<button type="button" id="mode-ai" class="mode" aria-selected="false">AI</button>
2525
</div>
26-
<input id="q" type="text" placeholder="Search DuckDuckGo…" autocomplete="off" autofocus />
26+
<input id="q" type="text" placeholder="Search Xprivo…" autocomplete="off" autofocus />
2727
</form>
2828

2929
<nav class="links">
30+
<a href="https://www.xprivo.com">Xprivo</a>
3031
<a href="https://duckduckgo.com">DuckDuckGo</a>
3132
<a href="https://github.com/profullstack/tronbrowser.dev">GitHub</a>
3233
<a href="https://tronbrowser.dev">tronbrowser.dev</a>

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,33 @@ const DEFAULT_TICKERS = 'SPY, AAPL, NVDA, BTC-USD';
99
const DEFAULT_LEAGUES = 'nfl, nba';
1010
const splitList = (s) => String(s || '').split(',').map((x) => x.trim()).filter(Boolean);
1111

12-
// --- Search: Web (DuckDuckGo, default) or AI (our sidebar, BYO provider) ---
12+
// --- Search: Web (Xprivo by default, DuckDuckGo alternative) or AI (sidebar) ---
13+
const SEARCH_ENGINES = {
14+
xprivo: { name: 'Xprivo', url: 'https://www.xprivo.com/search/?q=' },
15+
ddg: { name: 'DuckDuckGo', url: 'https://duckduckgo.com/?q=' },
16+
};
1317
let searchMode = 'web';
18+
let searchEngine = 'xprivo';
19+
1420
function setMode(mode) {
1521
searchMode = mode;
1622
el('mode-web').classList.toggle('active', mode === 'web');
1723
el('mode-ai').classList.toggle('active', mode === 'ai');
1824
el('mode-web').setAttribute('aria-selected', mode === 'web');
1925
el('mode-ai').setAttribute('aria-selected', mode === 'ai');
20-
el('q').placeholder = mode === 'ai' ? 'Ask AI anything…' : 'Search DuckDuckGo…';
26+
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.xprivo;
27+
el('q').placeholder = mode === 'ai' ? 'Ask AI anything…' : `Search ${eng.name}…`;
2128
el('q').focus();
2229
}
2330
el('mode-web').addEventListener('click', () => setMode('web'));
2431
el('mode-ai').addEventListener('click', () => setMode('ai'));
2532

33+
// Load the chosen web search engine (default Xprivo).
34+
chrome.storage.local.get('searchEngine').then(({ searchEngine: se }) => {
35+
if (se && SEARCH_ENGINES[se]) searchEngine = se;
36+
if (searchMode === 'web') setMode('web');
37+
});
38+
2639
el('search').addEventListener('submit', async (e) => {
2740
e.preventDefault();
2841
const q = el('q').value.trim();
@@ -33,7 +46,8 @@ el('search').addEventListener('submit', async (e) => {
3346
chrome.runtime.sendMessage({ type: 'open-sidepanel' });
3447
el('q').value = '';
3548
} else {
36-
location.href = 'https://duckduckgo.com/?q=' + encodeURIComponent(q);
49+
const eng = SEARCH_ENGINES[searchEngine] || SEARCH_ENGINES.xprivo;
50+
location.href = eng.url + encodeURIComponent(q);
3751
}
3852
});
3953

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ <h2>bittorrented.com — Live TV, Radio &amp; Podcasts</h2>
7878
<button id="btrConnect" class="ghost">Connect bittorrented.com</button>
7979
<span id="btrMsg" class="saved"></span>
8080

81+
<h2>Search</h2>
82+
<p class="hint">Default search engine for the new-tab search box. Xprivo is the
83+
private default; DuckDuckGo is available as an alternative. (The omnibox default
84+
is set separately in <code>chrome://settings/search</code>.)</p>
85+
<label for="searchEngine">New-tab search engine</label>
86+
<select id="searchEngine">
87+
<option value="xprivo">Xprivo (private, default)</option>
88+
<option value="ddg">DuckDuckGo</option>
89+
</select>
90+
<div><button id="saveSearch">Save search</button><span id="savedSearch" class="saved"></span></div>
91+
8192
<h2>Markets &amp; Sports</h2>
8293
<p class="hint">Shown on the new-tab page. Free &amp; keyless — stock/crypto quotes from
8394
Yahoo Finance, scores from ESPN. Leave blank to hide a section.</p>

‎apps/desktop/extensions/ai-sidebar/options.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ el('btrConnect').addEventListener('click', async () => {
142142
await renderBtr();
143143
});
144144

145+
/* ---------- Search engine ---------- */
146+
el('saveSearch').addEventListener('click', async () => {
147+
await chrome.storage.local.set({ searchEngine: el('searchEngine').value });
148+
await pushSettings();
149+
flash('savedSearch', 'saved ✓');
150+
});
151+
145152
/* ---------- Markets & Sports (new-tab widgets) ---------- */
146153
el('saveMarkets').addEventListener('click', async () => {
147154
const tickers = el('tickers').value.trim();
@@ -239,9 +246,10 @@ async function loadAll() {
239246
buildProviders(provs, aiDefault);
240247
el('cpClient').value = coinpayConfig?.clientId || '';
241248
el('syncUrl').value = syncConfig?.url || '';
242-
const mkt = await chrome.storage.local.get(['tickers', 'leagues']);
249+
const mkt = await chrome.storage.local.get(['tickers', 'leagues', 'searchEngine']);
243250
el('tickers').value = mkt.tickers ?? '';
244251
el('leagues').value = mkt.leagues ?? '';
252+
el('searchEngine').value = mkt.searchEngine ?? 'xprivo';
245253
await renderAccount();
246254
await renderFeeds();
247255
await renderBtr();

‎apps/desktop/extensions/ai-sidebar/settings-store.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const CLOUD_BASE = 'https://tronbrowser.dev';
1111

1212
// Keys that sync. NOTE: plaintext API keys (aiConfig/aiProviders) are NEVER
1313
// synced — only the E2E-encrypted vault (aiVault) plus non-sensitive prefs.
14-
const KEYS = ['aiVault', 'aiDefault', 'aiModel', 'feeds', 'coinpayConfig', 'tickers', 'leagues'];
14+
const KEYS = ['aiVault', 'aiDefault', 'aiModel', 'feeds', 'coinpayConfig', 'tickers', 'leagues', 'searchEngine'];
1515

1616
async function endpoint() {
1717
const { syncConfig } = await chrome.storage.local.get('syncConfig');

‎apps/desktop/launcher/tronbrowser‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ if flag not in exp:
107107
PY
108108
fi
109109

110-
# Default the omnibox to DuckDuckGo (Ungoogled ships no default search engine,
111-
# so keyword input becomes http://<keyword>). Only seeds on first run; the user
112-
# can change it in chrome://settings/search afterward.
110+
# Default the omnibox to Xprivo (Ungoogled ships no default search engine, so
111+
# keyword input becomes http://<keyword>). DuckDuckGo is available as an
112+
# alternative. Only seeds on first run; change it in chrome://settings/search.
113113
if command -v python3 >/dev/null 2>&1; then
114114
TB_PREFS="$DATA/Default/Preferences" python3 - <<'PY' 2>/dev/null || true
115115
import json, os
@@ -121,11 +121,10 @@ except Exception:
121121
d = {}
122122
if not d.get("default_search_provider_data", {}).get("template_url_data"):
123123
d.setdefault("default_search_provider_data", {})["template_url_data"] = {
124-
"short_name": "DuckDuckGo",
125-
"keyword": "duckduckgo.com",
126-
"url": "https://duckduckgo.com/?q={searchTerms}",
127-
"suggestions_url": "https://duckduckgo.com/ac/?q={searchTerms}&type=list",
128-
"favicon_url": "https://duckduckgo.com/favicon.ico",
124+
"short_name": "Xprivo",
125+
"keyword": "xprivo.com",
126+
"url": "https://www.xprivo.com/search/?q={searchTerms}",
127+
"favicon_url": "https://www.xprivo.com/favicon.ico",
129128
"safe_for_autoreplace": False,
130129
}
131130
json.dump(d, open(p, "w"))

‎apps/desktop/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tronbrowser/desktop",
3-
"version": "0.1.32",
3+
"version": "0.1.33",
44
"private": true,
55
"description": "Desktop shell for the TronBrowser Chromium fork",
66
"type": "module",

‎apps/docs/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tronbrowser/docs",
3-
"version": "0.1.32",
3+
"version": "0.1.33",
44
"private": true,
55
"description": "Documentation site",
66
"type": "module",

0 commit comments

Comments
 (0)