mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
this fixes #875
This commit is contained in:
parent
72201527d3
commit
92f7e2da8a
1 changed files with 9 additions and 3 deletions
|
|
@ -76,6 +76,12 @@ vAPI.storage = chrome.storage.local;
|
||||||
|
|
||||||
vAPI.browserSettings = {
|
vAPI.browserSettings = {
|
||||||
set: function(details) {
|
set: function(details) {
|
||||||
|
// https://github.com/gorhill/uBlock/issues/875
|
||||||
|
// Must not leave `lastError` unchecked.
|
||||||
|
var callback = function() {
|
||||||
|
void chrome.runtime.lastError;
|
||||||
|
};
|
||||||
|
|
||||||
for ( var setting in details ) {
|
for ( var setting in details ) {
|
||||||
if ( details.hasOwnProperty(setting) === false ) {
|
if ( details.hasOwnProperty(setting) === false ) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -86,7 +92,7 @@ vAPI.browserSettings = {
|
||||||
chrome.privacy.network.networkPredictionEnabled.set({
|
chrome.privacy.network.networkPredictionEnabled.set({
|
||||||
value: !!details[setting],
|
value: !!details[setting],
|
||||||
scope: 'regular'
|
scope: 'regular'
|
||||||
});
|
}, callback);
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
console.error(ex);
|
console.error(ex);
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +103,7 @@ vAPI.browserSettings = {
|
||||||
chrome.privacy.websites.hyperlinkAuditingEnabled.set({
|
chrome.privacy.websites.hyperlinkAuditingEnabled.set({
|
||||||
value: !!details[setting],
|
value: !!details[setting],
|
||||||
scope: 'regular'
|
scope: 'regular'
|
||||||
});
|
}, callback);
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
console.error(ex);
|
console.error(ex);
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +115,7 @@ vAPI.browserSettings = {
|
||||||
chrome.privacy.network.webRTCMultipleRoutesEnabled.set({
|
chrome.privacy.network.webRTCMultipleRoutesEnabled.set({
|
||||||
value: !!details[setting],
|
value: !!details[setting],
|
||||||
scope: 'regular'
|
scope: 'regular'
|
||||||
});
|
}, callback);
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
console.error(ex);
|
console.error(ex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue