mirror of https://github.com/gorhill/uBlock.git
Fix spurious output at uBO's dev console
Regression from https://github.com/gorhill/uBlock/commit/0d369cda21bb
This commit is contained in:
parent
47ceaea3b9
commit
426a6ea9a7
|
@ -35,9 +35,6 @@ if ( vAPI.webextFlavor === undefined ) {
|
||||||
|
|
||||||
const µBlock = (function() { // jshint ignore:line
|
const µBlock = (function() { // jshint ignore:line
|
||||||
|
|
||||||
const oneSecond = 1000,
|
|
||||||
oneMinute = 60 * oneSecond;
|
|
||||||
|
|
||||||
const hiddenSettingsDefault = {
|
const hiddenSettingsDefault = {
|
||||||
assetFetchTimeout: 30,
|
assetFetchTimeout: 30,
|
||||||
autoCommentFilterTemplate: '{{date}} {{origin}}',
|
autoCommentFilterTemplate: '{{date}} {{origin}}',
|
||||||
|
@ -97,22 +94,20 @@ const µBlock = (function() { // jshint ignore:line
|
||||||
|
|
||||||
hiddenSettingsDefault: hiddenSettingsDefault,
|
hiddenSettingsDefault: hiddenSettingsDefault,
|
||||||
hiddenSettings: (function() {
|
hiddenSettings: (function() {
|
||||||
const out = Object.assign({}, hiddenSettingsDefault),
|
const out = Object.assign({}, hiddenSettingsDefault);
|
||||||
json = vAPI.localStorage.getItem('immediateHiddenSettings');
|
const json = vAPI.localStorage.getItem('immediateHiddenSettings');
|
||||||
if ( typeof json === 'string' ) {
|
if ( typeof json !== 'string' ) { return out; }
|
||||||
try {
|
try {
|
||||||
const o = JSON.parse(json);
|
const o = JSON.parse(json);
|
||||||
if ( o instanceof Object ) {
|
if ( o instanceof Object ) {
|
||||||
for ( const k in o ) {
|
for ( const k in o ) {
|
||||||
if ( out.hasOwnProperty(k) ) {
|
if ( out.hasOwnProperty(k) ) { out[k] = o[k]; }
|
||||||
out[k] = o[k];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
self.log.verbosity = out.consoleLogLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(ex) {
|
catch(ex) {
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return out;
|
return out;
|
||||||
})(),
|
})(),
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,6 @@ self.log = (function() {
|
||||||
set verbosity(level) {
|
set verbosity(level) {
|
||||||
this.info = console.info = level === 'info' ? info : noopFunc;
|
this.info = console.info = level === 'info' ? info : noopFunc;
|
||||||
},
|
},
|
||||||
info,
|
info: noopFunc,
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -196,10 +196,9 @@
|
||||||
vAPI.localStorage.setItem(
|
vAPI.localStorage.setItem(
|
||||||
'immediateHiddenSettings',
|
'immediateHiddenSettings',
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
cacheStorageAPI: this.hiddenSettings.cacheStorageAPI,
|
consoleLogLevel: this.hiddenSettings.consoleLogLevel,
|
||||||
disableWebAssembly: this.hiddenSettings.disableWebAssembly,
|
disableWebAssembly: this.hiddenSettings.disableWebAssembly,
|
||||||
suspendTabsUntilReady: this.hiddenSettings.suspendTabsUntilReady,
|
suspendTabsUntilReady: this.hiddenSettings.suspendTabsUntilReady,
|
||||||
userResourcesLocation: this.hiddenSettings.userResourcesLocation,
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue