extension-create 4.1.14 → 4.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.cjs +1 -1
- package/dist/steps/import-external-template.d.ts +1 -1
- package/dist/test-template-javascript/.extension-create.json +3 -3
- package/dist/test-template-javascript/STORE.md +1 -1
- package/dist/test-template-javascript/package.json +2 -1
- package/dist/test-template-javascript/src/background.ts +12 -12
- package/package.json +1 -1
- package/templates/javascript/src/background.js +12 -12
package/dist/module.cjs
CHANGED
|
@@ -606,7 +606,7 @@ const NETWORK_TIMEOUT_MS = (()=>{
|
|
|
606
606
|
return Number.isFinite(raw) && raw > 0 ? raw : 60000;
|
|
607
607
|
})();
|
|
608
608
|
const CODELOAD_BASE = 'https://codeload.github.com/extension-js/examples/zip';
|
|
609
|
-
const DEFAULT_TEMPLATES_REF = '
|
|
609
|
+
const DEFAULT_TEMPLATES_REF = 'd951b735ee5fbe904bba0c47d688527300d10e32';
|
|
610
610
|
const BUNDLED_TEMPLATES = [
|
|
611
611
|
"javascript"
|
|
612
612
|
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DEFAULT_TEMPLATES_REF = "
|
|
1
|
+
export declare const DEFAULT_TEMPLATES_REF = "d951b735ee5fbe904bba0c47d688527300d10e32";
|
|
2
2
|
export declare const BUNDLED_TEMPLATES: readonly string[];
|
|
3
3
|
export declare const DEFAULT_TEMPLATE_NAME = "typescript";
|
|
4
4
|
export declare const OFFLINE_FALLBACK_TEMPLATE = "javascript";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"createdWith": "extension-create@4.1.
|
|
2
|
+
"createdWith": "extension-create@4.1.15",
|
|
3
3
|
"template": "typescript",
|
|
4
|
-
"source": "https://codeload.github.com/extension-js/examples/zip/
|
|
5
|
-
"ref": "
|
|
4
|
+
"source": "https://codeload.github.com/extension-js/examples/zip/d951b735ee5fbe904bba0c47d688527300d10e32",
|
|
5
|
+
"ref": "d951b735ee5fbe904bba0c47d688527300d10e32"
|
|
6
6
|
}
|
|
@@ -9,7 +9,7 @@ Packaging your extension is local and free. Submitting the result to a
|
|
|
9
9
|
store is what [extension.dev](https://docs.extension.dev/publish/overview?utm_source=store-md)
|
|
10
10
|
does, and it sponsors Extension.js.
|
|
11
11
|
|
|
12
|
-
Last updated: 2026-09-
|
|
12
|
+
Last updated: 2026-09-09
|
|
13
13
|
|
|
14
14
|
## Listing
|
|
15
15
|
|
|
@@ -24,21 +24,21 @@ if (!isFirefoxLike) {
|
|
|
24
24
|
chrome.sidePanel.setPanelBehavior({openPanelOnActionClick: true})
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
chrome.runtime.onMessage.addListener((message) => {
|
|
27
|
+
chrome.runtime.onMessage.addListener((message, sender) => {
|
|
28
28
|
if (!message || message.type !== 'openSidebar') return
|
|
29
29
|
|
|
30
|
+
// Every line here runs synchronously on purpose. sidePanel.open() is only
|
|
31
|
+
// allowed inside the user gesture that the content-script click carries, and
|
|
32
|
+
// a tabs.query callback outlives it: the panel then silently refuses to open.
|
|
33
|
+
// sender.tab is the tab the click came from, so no lookup is needed at all.
|
|
30
34
|
chrome.sidePanel.setPanelBehavior({openPanelOnActionClick: true})
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
const tabId = sender.tab?.id
|
|
37
|
+
if (!chrome.sidePanel.open || tabId === undefined) return
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
chrome.sidePanel.open({tabId: activeTabId})
|
|
40
|
-
} catch (error) {
|
|
41
|
-
console.error(error)
|
|
42
|
-
}
|
|
43
|
-
})
|
|
39
|
+
try {
|
|
40
|
+
chrome.sidePanel.open({tabId})
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.error(error)
|
|
43
|
+
}
|
|
44
44
|
})
|
package/package.json
CHANGED
|
@@ -24,21 +24,21 @@ if (!isFirefoxLike) {
|
|
|
24
24
|
chrome.sidePanel.setPanelBehavior({openPanelOnActionClick: true})
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
chrome.runtime.onMessage.addListener((message) => {
|
|
27
|
+
chrome.runtime.onMessage.addListener((message, sender) => {
|
|
28
28
|
if (!message || message.type !== 'openSidebar') return
|
|
29
29
|
|
|
30
|
+
// Every line here runs synchronously on purpose. sidePanel.open() is only
|
|
31
|
+
// allowed inside the user gesture that the content-script click carries, and
|
|
32
|
+
// a tabs.query callback outlives it: the panel then silently refuses to open.
|
|
33
|
+
// sender.tab is the tab the click came from, so no lookup is needed at all.
|
|
30
34
|
chrome.sidePanel.setPanelBehavior({openPanelOnActionClick: true})
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
const tabId = sender.tab?.id
|
|
37
|
+
if (!chrome.sidePanel.open || tabId === undefined) return
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
chrome.sidePanel.open({tabId: activeTabId})
|
|
40
|
-
} catch (error) {
|
|
41
|
-
console.error(error)
|
|
42
|
-
}
|
|
43
|
-
})
|
|
39
|
+
try {
|
|
40
|
+
chrome.sidePanel.open({tabId})
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.error(error)
|
|
43
|
+
}
|
|
44
44
|
})
|