minor code review

This commit is contained in:
Raymond Hill 2018-07-25 18:24:14 -04:00
parent fd454e272d
commit 7702b1f4bc
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 4 additions and 6 deletions

View File

@ -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);
};
})();
/******************************************************************************/