Skip to content

Commit 5ec5d24

Browse files
committed
fix isolated world for ufs_global_webpage_context
1 parent a15860c commit 5ec5d24

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

manifest.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,27 @@
2929
"content_scripts": [
3030
{
3131
"matches": ["<all_urls>"],
32-
"js": [
33-
"scripts/content-scripts/document_start.js",
34-
"scripts/content-scripts/scripts/ufs_global_webpage_context.js"
35-
],
36-
"run_at": "document_start"
32+
"js": ["scripts/content-scripts/scripts/ufs_global_webpage_context.js"],
33+
"run_at": "document_start",
34+
"world": "MAIN"
35+
},
36+
{
37+
"matches": ["<all_urls>"],
38+
"js": ["scripts/content-scripts/document_start.js"],
39+
"run_at": "document_start",
40+
"world": "ISOLATED"
3741
},
3842
{
3943
"matches": ["<all_urls>"],
4044
"js": ["scripts/content-scripts/document_idle.js"],
41-
"run_at": "document_idle"
45+
"run_at": "document_idle",
46+
"world": "ISOLATED"
4247
},
4348
{
4449
"matches": ["<all_urls>"],
4550
"js": ["scripts/content-scripts/document_end.js"],
46-
"run_at": "document_end"
51+
"run_at": "document_end",
52+
"world": "ISOLATED"
4753
}
4854
],
4955
"web_accessible_resources": [

scripts/content-scripts/scripts/ufs_global_webpage_context.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,8 +1346,3 @@ window.UsefulScriptsUtils = UsefulScriptsUtils;
13461346
// Chrome pre-34
13471347
if (!Element.prototype.matches)
13481348
Element.prototype.matches = Element.prototype.webkitMatchesSelector;
1349-
1350-
// https://mmazzarolo.com/blog/2022-08-25-simple-colored-logging-for-javascript-clis/
1351-
window.console.success = (...args) => console.log("\x1b[32m✔\x1b[0m", ...args);
1352-
window.console.failure = (...args) =>
1353-
console.error("\x1b[31mx\x1b[0m", ...args);

0 commit comments

Comments
 (0)