mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
This commit is contained in:
parent
4e1ba3b12a
commit
9ce1f8af08
3 changed files with 18 additions and 2 deletions
|
@ -990,8 +990,7 @@ var onMessage = function(request, sender, callback) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'writeHiddenSettings':
|
case 'writeHiddenSettings':
|
||||||
µb.hiddenSettings = µb.hiddenSettingsFromString(request.content);
|
µb.changeHiddenSettings(µb.hiddenSettingsFromString(request.content));
|
||||||
µb.saveHiddenSettings();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -484,6 +484,8 @@ RedirectEngine.prototype.resourcesFromString = function(text) {
|
||||||
}
|
}
|
||||||
|
|
||||||
warResolve();
|
warResolve();
|
||||||
|
|
||||||
|
this.modifyTime = Date.now();
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -379,6 +379,21 @@ var matchBucket = function(url, hostname, bucket, start) {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
// https://www.reddit.com/r/uBlockOrigin/comments/8524cf/my_custom_scriptlets_doesnt_work_what_am_i_doing/
|
||||||
|
|
||||||
|
µBlock.changeHiddenSettings = function(hs) {
|
||||||
|
var mustReloadResources =
|
||||||
|
hs.userResourcesLocation !== this.hiddenSettings.userResourcesLocation;
|
||||||
|
this.hiddenSettings = hs;
|
||||||
|
this.saveHiddenSettings();
|
||||||
|
if ( mustReloadResources ) {
|
||||||
|
this.redirectEngine.invalidateResourcesSelfie();
|
||||||
|
this.loadRedirectResources();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
µBlock.elementPickerExec = function(tabId, targetElement, zap) {
|
µBlock.elementPickerExec = function(tabId, targetElement, zap) {
|
||||||
if ( vAPI.isBehindTheSceneTabId(tabId) ) {
|
if ( vAPI.isBehindTheSceneTabId(tabId) ) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue