From adf850f77afe163035b01ff6d14f82cfc6f64441 Mon Sep 17 00:00:00 2001 From: Erik Beuschau Date: Tue, 17 Feb 2026 14:07:40 +0100 Subject: [PATCH] Improve nordcraft.site support in Chrome extension --- chrome/manifest.json | 13 ++++--------- chrome/src/background.ts | 8 ++++++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/chrome/manifest.json b/chrome/manifest.json index 945eba4..0184a79 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Nordcraft", "description": "Browser extension for the Nordcraft editor.", - "version": "2.3.7", + "version": "2.3.8", "icons": { "32": "icons/nordcraft-32.png", "64": "icons/nordcraft-64.png", @@ -20,10 +20,7 @@ "webRequest", "tabs" ], - "host_permissions": [ - "https://*.toddle.site/*", - "https://*.nordcraft.site/*" - ], + "host_permissions": ["https://*.toddle.site/*", "https://*.nordcraft.site/*"], "content_scripts": [ { "matches": [ @@ -31,10 +28,8 @@ "https://editor.nordcraft.com/*", "https://*.nordcraft.site/*" ], - "js": [ - "chrome/src/install_notifier.js" - ], + "js": ["chrome/src/install_notifier.js"], "run_at": "document_start" } ] -} \ No newline at end of file +} diff --git a/chrome/src/background.ts b/chrome/src/background.ts index fdd5e44..5e92a5d 100644 --- a/chrome/src/background.ts +++ b/chrome/src/background.ts @@ -56,7 +56,8 @@ chrome.tabs.onActivated.addListener(async (activeInfo) => { if ( url.host.endsWith('nordcraft.com') === false && - url.host.endsWith('-toddle.toddle.site') === false + url.host.endsWith('-toddle.toddle.site') === false && + url.host.endsWith('-toddle.nordcraft.site') === false ) { return false } @@ -69,7 +70,10 @@ chrome.tabs.onActivated.addListener(async (activeInfo) => { const frameUrl = frames ?.map((frame) => { const url = new URL(frame.url) - if (url.host?.endsWith('.toddle.site')) { + if ( + url.host?.endsWith('.toddle.site') || + url.host?.endsWith('.nordcraft.site') + ) { return frame.url } })