Fix page provider bridge and add orange extension icon

This commit is contained in:
matcha committed 2026-10-05 05:26:25 +00:00
1 parent ea535b8037
commit 00309d7c4d
6 files changed
+52 -34

No files matched your search

+1 -20
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

+51 -14
View File
@@ -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"
}
}