1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-02 10:24:59 +12:00

this fixes #77

This commit is contained in:
Raymond Hill 2014-12-07 17:46:19 -02:00
parent 5777dc0b15
commit f0063372c5
2 changed files with 9 additions and 1 deletions

View file

@ -34,7 +34,7 @@
/******************************************************************************/
µMatrix.saveUserSettings = function() {
chrome.storage.local.set(
this.XAL.keyvalSetMany(
this.userSettings,
this.getBytesInUse.bind(this)
);
@ -420,6 +420,8 @@
delete µm.userSettings.processReferer;
delete µm.userSettings.spoofUserAgent;
µm.saveUserSettings();
µm.XAL.keyvalRemoveOne('processReferer');
µm.XAL.keyvalRemoveOne('spoofUserAgent');
};
var onSettingsReady = function(settings) {

View file

@ -80,6 +80,12 @@ exports.keyvalSetMany = function(dict, callback) {
/******************************************************************************/
exports.keyvalRemoveOne = function(key, callback) {
chrome.storage.local.remove(key, callback || noopFunc);
};
/******************************************************************************/
exports.keyvalRemoveAll = function(callback) {
chrome.storage.local.clear(callback || noopFunc);
};