mirror of
https://github.com/Carbon-for-F1TV/Carbon-for-F1TV.git
synced 2026-11-11 01:10:09 +01:00
fix(firefox): inject script into page context to avoid DeadObject issue
Recent Firefox update caused cross-window access issues. Injecting the script into the page context resolves this.
This commit is contained in:
1 parent
535004ae25
commit
7f4fabfcd8
2 files changed
+9
-1
No files matched your search
@@ -0,0 +1,8 @@
|
||||
function loadScript(url) {
|
||||
let script = document.createElement("script");
|
||||
script.src = browser.runtime.getURL(url);
|
||||
document.documentElement.appendChild(script);
|
||||
}
|
||||
|
||||
loadScript("lib/jquery-3.7.1.min.js");
|
||||
loadScript("carbon-for-f1tv.user.js");
|
||||
@@ -17,7 +17,7 @@
|
||||
"matches":[
|
||||
"https://f1tv.formula1.com/*"
|
||||
],
|
||||
"js": ["lib/jquery-3.7.1.min.js", "carbon-for-f1tv.user.js"]
|
||||
"js": ["load.js"]
|
||||
}
|
||||
],
|
||||
"browser_action": {
|
||||
|
||||
Reference in new issue
Block a user