From 00309d7c4d2fb822b79142bb430e06d95cc81e6c Mon Sep 17 00:00:00 2001 From: matcha Date: Mon, 5 Oct 2026 05:26:25 +0000 Subject: [PATCH] Fix page provider bridge and add orange extension icon --- extension/content.js | 21 +----------- extension/icons/icon128.png | Bin 0 -> 396 bytes extension/icons/icon16.png | Bin 0 -> 115 bytes extension/icons/icon32.png | Bin 0 -> 136 bytes extension/icons/icon48.png | Bin 0 -> 151 bytes extension/manifest.json | 65 ++++++++++++++++++++++++++++-------- 6 files changed, 52 insertions(+), 34 deletions(-) create mode 100644 extension/icons/icon128.png create mode 100644 extension/icons/icon16.png create mode 100644 extension/icons/icon32.png create mode 100644 extension/icons/icon48.png diff --git a/extension/content.js b/extension/content.js index 6da0e9c..04ffb62 100644 --- a/extension/content.js +++ b/extension/content.js @@ -1,20 +1 @@ -(() => { - const script = document.createElement("script"); - script.src = chrome.runtime.getURL("injected.js"); - script.onload = () => script.remove(); - (document.documentElement || document.head).appendChild(script); - - let port; - const connect = () => { - port = chrome.runtime.connect({ name: "inscriboor-provider" }); - port.onMessage.addListener(message => window.postMessage({ source: "inscriboor-extension", ...message }, "*")); - port.onDisconnect.addListener(() => { port = null; }); - }; - connect(); - - window.addEventListener("message", event => { - if (event.source !== window || event.data?.source !== "inscriboor-page") return; - if (!port) connect(); - port.postMessage({ id:event.data.id, method:event.data.method, params:event.data.params, origin:location.origin }); - }); -})(); +(() => {n let port;n const connect = () => {n port = chrome.runtime.connect({ name: "inscriboor-provider" });n port.onMessage.addListener(message => window.postMessage({ source: "inscriboor-extension", ...message }, "*"));n port.onDisconnect.addListener(() => { port = null; });n };n connect();n window.addEventListener("message", event => {n if (event.source !== window || event.data?.source !== "inscriboor-page") return;n if (!port) connect();n port.postMessage({ id:event.data.id, method:event.data.method, params:event.data.params, origin:location.origin });n });n})();n \ No newline at end of file diff --git a/extension/icons/icon128.png b/extension/icons/icon128.png new file mode 100644 index 0000000000000000000000000000000000000000..15dc7b71c645d3084b3cd0702345a396cd825046 GIT binary patch literal 396 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrU`+CKaSW-r_4cA6FN1=>fep<6 z=RNFY`j#QOW~S9<^J8}2*GglrZ_+tEiiiz?KM8W@rwHi%e|kUw7|bkFLY{a%QR4sr D=IzG! literal 0 HcmV?d00001 diff --git a/extension/icons/icon16.png b/extension/icons/icon16.png new file mode 100644 index 0000000000000000000000000000000000000000..ff3e09bf6745e1476828c36f02c51a846f310d00 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`CY~;iAr-fhfBgS%&#Wrp6A>}P z@Kr-3bB3KjDw9{kTEG!EDtnmXH5Va&EVJ9D#Ng@b=d#Wzp$PyWctmUf literal 0 HcmV?d00001 diff --git a/extension/manifest.json b/extension/manifest.json index 9b8c61c..6c494de 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -1,19 +1,56 @@ { "manifest_version": 3, "name": "Inscriboor", - "version": "0.2.0", + "version": "0.2.1", "description": "Bitcoin/ordinal signing wallet for Super Testnet experiments.", - "permissions": ["storage"], - "action": { "default_popup": "index.html" }, - "background": { "service_worker": "background.js", "type": "module" }, - "content_scripts": [{ - "matches": ["https://supertestnet.lol/*", "http://localhost/*", "http://127.0.0.1/*"], - "js": ["content.js"], - "run_at": "document_start" - }], - "web_accessible_resources": [{ - "resources": ["injected.js"], - "matches": ["https://supertestnet.lol/*", "http://localhost/*", "http://127.0.0.1/*"] - }], - "content_security_policy": { "extension_pages": "script-src 'self'; object-src 'none'" } + "permissions": [ + "storage" + ], + "action": { + "default_popup": "index.html", + "default_icon": { + "16": "icons/icon16.png", + "32": "icons/icon32.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" + } + }, + "background": { + "service_worker": "background.js", + "type": "module" + }, + "content_scripts": [ + { + "matches": [ + "https://supertestnet.lol/*", + "http://localhost/*", + "http://127.0.0.1/*" + ], + "js": [ + "injected.js" + ], + "run_at": "document_start", + "world": "MAIN" + }, + { + "matches": [ + "https://supertestnet.lol/*", + "http://localhost/*", + "http://127.0.0.1/*" + ], + "js": [ + "content.js" + ], + "run_at": "document_start" + } + ], + "content_security_policy": { + "extension_pages": "script-src 'self'; object-src 'none'" + }, + "icons": { + "16": "icons/icon16.png", + "32": "icons/icon32.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" + } }