mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-05-06 13:23:26 +12:00
Fix broken content scripts in Firefox
Related commit: - https://github.com/gorhill/uMatrix/commit/9b292304d33a Forgot to declare `/js/vapi.js` as first content script to inject.
This commit is contained in:
parent
cb9934f67a
commit
a9f32a475f
|
@ -20,7 +20,7 @@
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["http://*/*", "https://*/*"],
|
"matches": ["http://*/*", "https://*/*"],
|
||||||
"js": ["/js/vapi-client.js", "/js/contentscript-start.js"],
|
"js": ["/js/vapi.js", "/js/vapi-client.js", "/js/contentscript-start.js"],
|
||||||
"run_at": "document_start",
|
"run_at": "document_start",
|
||||||
"all_frames": true
|
"all_frames": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
// borrowed from NoScript:
|
// borrowed from NoScript:
|
||||||
// https://github.com/hackademix/noscript/commit/6e80d3f130773fc9a9123c5c4c2e97d63e90fa2a
|
// https://github.com/hackademix/noscript/commit/6e80d3f130773fc9a9123c5c4c2e97d63e90fa2a
|
||||||
|
|
||||||
(function() {
|
(( ) => {
|
||||||
let html = document.documentElement;
|
const html = document.documentElement;
|
||||||
if ( html instanceof HTMLElement === false ) { return; }
|
if ( html instanceof HTMLElement === false ) { return; }
|
||||||
|
|
||||||
let meta;
|
let meta;
|
||||||
|
@ -45,8 +45,8 @@
|
||||||
//
|
//
|
||||||
// The CSP directive is enforced as soon as the meta tag is inserted:
|
// The CSP directive is enforced as soon as the meta tag is inserted:
|
||||||
// > Enforce the policy policy.
|
// > Enforce the policy policy.
|
||||||
let head = document.head,
|
const head = document.head;
|
||||||
parent = head;
|
let parent = head;
|
||||||
if ( parent === null ) {
|
if ( parent === null ) {
|
||||||
parent = document.createElement('head');
|
parent = document.createElement('head');
|
||||||
html.appendChild(parent);
|
html.appendChild(parent);
|
||||||
|
|
Loading…
Reference in a new issue