feat: add built-in Moon I2P start page to Firefox and Android
check / check (macos-latest) (push) Failing after 27s
check / check (windows-latest) (push) Failing after 26s
check / check (ubuntu-latest) (push) Failing after 30s

- Firefox extension: add start.html/css/js as homepage and new-tab page (manifest bumped to 0.1.5, .xpi rebuilt). Shows router readiness, tunnel/NetDB/DHT tiles, torrents, and a .i2p/magnet address bar.
- openManager message now accepts an optional hash and reuses any open manager tab.
- Android: default page is file:///android_asset/start.html, backed by a MoonI2pStart JS bridge (status, torrents, open URL, diagnostics, copy .b32). Blocks file: navigation from the WebView.
- RouterService: add fetchLocalApiJsonOrNull for bounded local API reads.
- Built-in .i2p destinations reordered (NotBob, Postman first); README updated to match.
This commit is contained in:
nandi committed 2026-11-28 20:24:28 -08:00
1 parent 9d3df6e100
commit 7139a64544
11 files changed
+1355 -37

No files matched your search

+6 -4
View File
@@ -416,12 +416,14 @@ browser.runtime.onMessage.addListener(async (msg) => {
10000
);
case "openManager": {
const url = browser.runtime.getURL("manager.html");
const existing = await browser.tabs.query({ url });
const baseUrl = browser.runtime.getURL("manager.html");
const hash = typeof msg.hash === "string" && msg.hash ? msg.hash : "";
const targetUrl = hash ? `${baseUrl}${hash}` : baseUrl;
const existing = await browser.tabs.query({ url: `${baseUrl}*` });
if (existing.length > 0) {
await browser.tabs.update(existing[0].id, { active: true });
await browser.tabs.update(existing[0].id, { active: true, url: targetUrl });
} else {
await browser.tabs.create({ url });
await browser.tabs.create({ url: targetUrl });
}
return { ok: true };
}