From 8aeb670be1d252807252ee2bfe99b15b81c3e28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 6 Apr 2022 10:38:06 +0800 Subject: update from upstream --- js/background.js | 170 +++++++++++++++++++++++++++---------------------------- 1 file changed, 85 insertions(+), 85 deletions(-) (limited to 'js/background.js') diff --git a/js/background.js b/js/background.js index 889decd..b31bbed 100644 --- a/js/background.js +++ b/js/background.js @@ -2,7 +2,7 @@ ηMatrix - a browser extension to black/white list requests. Copyright (C) 2014-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 */ @@ -32,45 +32,45 @@ var ηMatrix = (function () { let oneDay = 24 * oneHour; let _RequestStats = function () { - this.reset(); + this.reset(); }; _RequestStats.prototype.reset = function () { - this.all = - this.doc = - this.frame = - this.script = - this.css = - this.image = - this.media = - this.xhr = - this.other = - this.cookie = 0; + this.all = + this.doc = + this.frame = + this.script = + this.css = + this.image = + this.media = + this.xhr = + this.other = + this.cookie = 0; }; var RequestStats = function () { - this.allowed = new _RequestStats (); - this.blocked = new _RequestStats (); + this.allowed = new _RequestStats (); + this.blocked = new _RequestStats (); }; RequestStats.prototype.reset = function () { - this.blocked.reset(); - this.allowed.reset(); + this.blocked.reset(); + this.allowed.reset(); }; RequestStats.prototype.record = function (type, blocked) { - // Remember: always test against **false** - if (blocked !== false) { + // Remember: always test against **false** + if (blocked !== false) { this.blocked[type] += 1; this.blocked.all += 1; - } else { + } else { this.allowed[type] += 1; this.allowed.all += 1; - } + } }; var requestStatsFactory = function () { - return new RequestStats(); + return new RequestStats(); }; /** @@ -93,8 +93,8 @@ var ηMatrix = (function () { */ var rawSettingsDefault = { - disableCSPReportInjection: false, - placeholderBackground: [ + disableCSPReportInjection: false, + placeholderBackground: [ 'url("data:image/png;base64,', 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAK', 'CAAAAACoWZBhAAAABGdBTUEAALGPC/xh', @@ -108,13 +108,13 @@ var ηMatrix = (function () { 'KzAzOjAwa+9TNQAAAABJRU5ErkJggg==', '") ', 'repeat scroll #fff' - ].join(''), - placeholderBorder: '1px solid rgba(0, 0, 0, 0.1)', - imagePlaceholder: true, - imagePlaceholderBackground: 'default', - imagePlaceholderBorder: 'default', - framePlaceholder: true, - framePlaceholderDocument: [ + ].join(''), + placeholderBorder: '1px solid rgba(0, 0, 0, 0.1)', + imagePlaceholder: true, + imagePlaceholderBackground: 'default', + imagePlaceholderBorder: 'default', + framePlaceholder: true, + framePlaceholderDocument: [ '', '', '