Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -20,21 +20,16 @@
"webRequest",
"tabs"
],
"host_permissions": [
"https://*.toddle.site/*",
"https://*.nordcraft.site/*"
],
"host_permissions": ["https://*.toddle.site/*", "https://*.nordcraft.site/*"],
"content_scripts": [
{
"matches": [
"https://*.toddle.site/*",
"https://editor.nordcraft.com/*",
"https://*.nordcraft.site/*"
],
"js": [
"chrome/src/install_notifier.js"
],
"js": ["chrome/src/install_notifier.js"],
"run_at": "document_start"
}
]
}
}
8 changes: 6 additions & 2 deletions chrome/src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
})
Expand Down