aboutsummaryrefslogtreecommitdiffstats
path: root/js/contentscript-start.js
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-04-06 10:38:06 +0800
committerJesús <heckyel@hyperbola.info>2022-04-06 10:38:06 +0800
commit8aeb670be1d252807252ee2bfe99b15b81c3e28d (patch)
treeced0973165449d620c5c40876c37ab16b17655f9 /js/contentscript-start.js
parent5aa99a2ea2b683ba35eb36dfc54efd79f3cfcb85 (diff)
downloadematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.tar.lz
ematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.tar.xz
ematrix-8aeb670be1d252807252ee2bfe99b15b81c3e28d.zip
update from upstream
Diffstat (limited to 'js/contentscript-start.js')
-rw-r--r--js/contentscript-start.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/js/contentscript-start.js b/js/contentscript-start.js
index 4680e8c..b7d74ba 100644
--- a/js/contentscript-start.js
+++ b/js/contentscript-start.js
@@ -2,7 +2,7 @@
ηMatrix - a browser extension to black/white list requests.
Copyright (C) 2017-2019 Raymond Hill
- Copyright (C) 2019-2020 Alessio Vanni
+ Copyright (C) 2019-2022 Alessio Vanni
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see {http://www.gnu.org/licenses/}.
- Home: https://libregit.spks.xyz/heckyel/ematrix
+ Home: https://gitlab.com/vannilla/ematrix
uMatrix Home: https://github.com/gorhill/uMatrix
*/
@@ -26,7 +26,7 @@
// Injected into content pages
(function () {
if (typeof vAPI !== 'object') {
- return;
+ return;
}
vAPI.selfWorkerSrcReported = vAPI.selfWorkerSrcReported || false;
@@ -35,15 +35,15 @@
var handler = function(ev) {
if (ev.isTrusted !== true
- || ev.originalPolicy.includes('report-uri about:blank') === false) {
+ || ev.originalPolicy.includes('report-uri about:blank') === false) {
return false;
}
// Firefox and Chromium differs in how they fill the
// 'effectiveDirective' property.
- // ηMatrix: what does Pale Moon/Basilisk do?
+ // ηMatrix: what does Pale Moon/Basilisk do?
if (ev.effectiveDirective.startsWith('worker-src') === false
- && ev.effectiveDirective.startsWith('frame-src') === false) {
+ && ev.effectiveDirective.startsWith('frame-src') === false) {
return false;
}
@@ -62,8 +62,8 @@
// reports.
if (ev.blockedURI.includes('://') === false) {
if (vAPI.selfWorkerSrcReported) {
- return true;
- }
+ return true;
+ }
vAPI.selfWorkerSrcReported = true;
}
@@ -80,8 +80,8 @@
document.addEventListener('securitypolicyviolation', function (ev) {
if (!handler(ev)) {
- return;
- }
+ return;
+ }
ev.stopPropagation();
ev.preventDefault();
}, true);