Raymond Hill 2018-03-19 10:25:03 -04:00
parent 4e1ba3b12a
commit 9ce1f8af08
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 18 additions and 2 deletions

View File

@ -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:

View File

@ -484,6 +484,8 @@ RedirectEngine.prototype.resourcesFromString = function(text) {
} }
warResolve(); warResolve();
this.modifyTime = Date.now();
}; };
/******************************************************************************/ /******************************************************************************/

View File

@ -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;