mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
cleanup
This commit is contained in:
parent
25036eb5cf
commit
28fc4f99d4
@ -1113,7 +1113,7 @@ var backupUserData = function(callback) {
|
|||||||
|
|
||||||
µb.restoreBackupSettings.lastBackupFile = filename;
|
µb.restoreBackupSettings.lastBackupFile = filename;
|
||||||
µb.restoreBackupSettings.lastBackupTime = Date.now();
|
µb.restoreBackupSettings.lastBackupTime = Date.now();
|
||||||
µb.keyvalSetMany(µb.restoreBackupSettings);
|
vAPI.storage.set(µb.restoreBackupSettings);
|
||||||
|
|
||||||
getLocalData(callback);
|
getLocalData(callback);
|
||||||
};
|
};
|
||||||
@ -1137,7 +1137,7 @@ var restoreUserData = function(request) {
|
|||||||
// Be sure to adjust `countdown` if adding/removing anything below
|
// Be sure to adjust `countdown` if adding/removing anything below
|
||||||
µb.keyvalSetOne('version', userData.version);
|
µb.keyvalSetOne('version', userData.version);
|
||||||
µBlock.saveLocalSettings(true);
|
µBlock.saveLocalSettings(true);
|
||||||
µb.keyvalSetMany(userData.userSettings, onCountdown);
|
vAPI.storage.set(userData.userSettings, onCountdown);
|
||||||
µb.keyvalSetOne('remoteBlacklists', userData.filterLists, onCountdown);
|
µb.keyvalSetOne('remoteBlacklists', userData.filterLists, onCountdown);
|
||||||
µb.keyvalSetOne('netWhitelist', userData.netWhitelist || '', onCountdown);
|
µb.keyvalSetOne('netWhitelist', userData.netWhitelist || '', onCountdown);
|
||||||
|
|
||||||
@ -1148,7 +1148,7 @@ var restoreUserData = function(request) {
|
|||||||
|
|
||||||
µb.keyvalSetOne('hostnameSwitchesString', userData.hostnameSwitchesString || '', onCountdown);
|
µb.keyvalSetOne('hostnameSwitchesString', userData.hostnameSwitchesString || '', onCountdown);
|
||||||
µb.assets.put('assets/user/filters.txt', userData.userFilters, onCountdown);
|
µb.assets.put('assets/user/filters.txt', userData.userFilters, onCountdown);
|
||||||
µb.keyvalSetMany({
|
vAPI.storage.set({
|
||||||
lastRestoreFile: request.file || '',
|
lastRestoreFile: request.file || '',
|
||||||
lastRestoreTime: Date.now(),
|
lastRestoreTime: Date.now(),
|
||||||
lastBackupFile: '',
|
lastBackupFile: '',
|
||||||
|
@ -46,12 +46,6 @@
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
µBlock.keyvalSetMany = function(dict, callback) {
|
|
||||||
vAPI.storage.set(dict, callback || this.noopFunc);
|
|
||||||
};
|
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
µBlock.saveLocalSettings = function(force) {
|
µBlock.saveLocalSettings = function(force) {
|
||||||
if ( force ) {
|
if ( force ) {
|
||||||
this.localSettingsModifyTime = Date.now();
|
this.localSettingsModifyTime = Date.now();
|
||||||
|
Loading…
Reference in New Issue
Block a user