aboutsummaryrefslogtreecommitdiffstats
path: root/js/messaging.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/messaging.js')
-rw-r--r--js/messaging.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/js/messaging.js b/js/messaging.js
index 6dd0979..86ac038 100644
--- a/js/messaging.js
+++ b/js/messaging.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://notabug.org/heckyel/ematrix
+ Home: https://gitlab.com/vannilla/ematrix
uMatrix Home: https://github.com/gorhill/uMatrix
*/
@@ -343,7 +343,7 @@
let sz = ηm.tMatrix.evaluateSwitchZ(request.switchName,
request.srcHostname);
ηm.tMatrix.setSwitchZ(request.switchName,
- request.scrHostname,
+ request.srcHostname,
sz === false);
return undefined;
});
@@ -676,7 +676,7 @@
addMethod('purgeCache', function (request, sender, cb) {
ηm.assets.purge(request.assetKey);
- ηm.assets.remove('compiled/' + request.assetKey);
+ ηm.assets.remove('cache/' + request.assetKey);
return undefined;
});
@@ -722,16 +722,16 @@
};
let onAllRemoved = function () {
- vAPI.storage.set(userData.settings, onCountdown);
+ vAPI.storage.set(data.settings, onCountdown);
vAPI.storage.set({
- userMatrix: userData.rules,
+ userMatrix: data.rules,
}, onCountdown);
vAPI.storage.set({
- liveHostsFiles: userData.hostsFiles,
+ liveHostsFiles: data.hostsFiles,
}, onCountdown);
- if (userData.rawSettings instanceof Object) {
- ηMatrix.saveRawSettings(userData.rawSettings, onCountdown);
+ if (data.rawSettings instanceof Object) {
+ ηMatrix.saveRawSettings(data.rawSettings, onCountdown);
}
};
@@ -740,7 +740,7 @@
ηm.XAL.keyvalRemoveAll(onAllRemoved);
};
- restoreUserData(request.userData);
+ restoreData(request.userData);
return undefined;
});
@@ -750,6 +750,8 @@
};
ηm.XAL.keyvalRemoveAll(onAllRemoved);
+ /* Let's also clear the database, just to really make it a reset */
+ ηm.assets.rmrf();
return undefined;
});
@@ -768,7 +770,7 @@
let tabIds = {};
for (let id in ηm.pageStores) {
- let store = ηm.pageStoreFromTabId(tabId);
+ let store = ηm.pageStoreFromTabId(id);
if (store === null) {
continue;