mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
minor code review
This commit is contained in:
parent
fd454e272d
commit
7702b1f4bc
@ -54,11 +54,6 @@
|
||||
µBlock.saveLocalSettings = (function() {
|
||||
let saveAfter = 4 * 60 * 1000;
|
||||
|
||||
let save = function(callback) {
|
||||
this.localSettingsLastSaved = Date.now();
|
||||
vAPI.storage.set(this.localSettings, callback);
|
||||
};
|
||||
|
||||
let onTimeout = ( ) => {
|
||||
let µb = µBlock;
|
||||
if ( µb.localSettingsLastModified > µb.localSettingsLastSaved ) {
|
||||
@ -69,7 +64,10 @@
|
||||
|
||||
vAPI.setTimeout(onTimeout, saveAfter);
|
||||
|
||||
return save;
|
||||
return function(callback) {
|
||||
this.localSettingsLastSaved = Date.now();
|
||||
vAPI.storage.set(this.localSettings, callback);
|
||||
};
|
||||
})();
|
||||
|
||||
/******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user