mirror of https://github.com/gorhill/uBlock.git
fix #2014
This commit is contained in:
parent
40f574537b
commit
95ec573141
|
@ -19,12 +19,18 @@
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* exported processObserver */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
// https://github.com/gorhill/uBlock/issues/800
|
// https://github.com/gorhill/uBlock/issues/800
|
||||||
this.EXPORTED_SYMBOLS = ['contentObserver', 'LocationChangeListener'];
|
this.EXPORTED_SYMBOLS = [
|
||||||
|
'contentObserver',
|
||||||
|
'processObserver',
|
||||||
|
'LocationChangeListener'
|
||||||
|
];
|
||||||
|
|
||||||
const {interfaces: Ci, utils: Cu} = Components;
|
const {interfaces: Ci, utils: Cu} = Components;
|
||||||
const {Services} = Cu.import('resource://gre/modules/Services.jsm', null);
|
const {Services} = Cu.import('resource://gre/modules/Services.jsm', null);
|
||||||
|
@ -64,20 +70,94 @@ const getMessageManager = function(win) {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
const getChildProcessMessageManager = function() {
|
// https://github.com/gorhill/uBlock/issues/2014
|
||||||
var svc = Services;
|
// Have a dictionary of hostnames for which there are script tag filters. This
|
||||||
if ( !svc ) {
|
// allow for coarse-testing before firing a synchronous message to the
|
||||||
return;
|
// parent process. Script tag filters are not very common, so this allows
|
||||||
}
|
// to skip the blocking of the child process most of the time.
|
||||||
var cpmm = svc.cpmm;
|
|
||||||
if ( cpmm ) {
|
var scriptTagFilterer = (function() {
|
||||||
return cpmm;
|
var scriptTagHostnames;
|
||||||
}
|
|
||||||
cpmm = Components.classes['@mozilla.org/childprocessmessagemanager;1'];
|
var getCpmm = function() {
|
||||||
if ( cpmm ) {
|
var svc = Services;
|
||||||
return cpmm.getService(Ci.nsISyncMessageSender);
|
if ( !svc ) { return; }
|
||||||
}
|
var cpmm = svc.cpmm;
|
||||||
};
|
if ( cpmm ) { return cpmm; }
|
||||||
|
cpmm = Components.classes['@mozilla.org/childprocessmessagemanager;1'];
|
||||||
|
if ( cpmm ) { return cpmm.getService(Ci.nsISyncMessageSender); }
|
||||||
|
};
|
||||||
|
|
||||||
|
var listener = function(message) {
|
||||||
|
var details;
|
||||||
|
try {
|
||||||
|
details = JSON.parse(message.data);
|
||||||
|
} catch (ex) {
|
||||||
|
}
|
||||||
|
if ( !details || !details.msg ) { return; }
|
||||||
|
if (details.msg.what === 'staticFilteringDataChanged' ) {
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var getScriptTagHostnames = function() {
|
||||||
|
if ( scriptTagHostnames ) {
|
||||||
|
return scriptTagHostnames;
|
||||||
|
}
|
||||||
|
var cpmm = getCpmm();
|
||||||
|
if ( !cpmm ) { return; }
|
||||||
|
var r = cpmm.sendSyncMessage(rpcEmitterName, { fnName: 'getScriptTagHostnames' });
|
||||||
|
if ( Array.isArray(r) && Array.isArray(r[0]) ) {
|
||||||
|
scriptTagHostnames = new Set(r[0]);
|
||||||
|
}
|
||||||
|
return scriptTagHostnames;
|
||||||
|
};
|
||||||
|
|
||||||
|
var getScriptTagFilters = function(details) {
|
||||||
|
let cpmm = getCpmm();
|
||||||
|
if ( !cpmm ) { return; }
|
||||||
|
let r = cpmm.sendSyncMessage(rpcEmitterName, {
|
||||||
|
fnName: 'getScriptTagFilters',
|
||||||
|
rootURL: details.rootURL,
|
||||||
|
frameURL: details.frameURL,
|
||||||
|
frameHostname: details.frameHostname
|
||||||
|
});
|
||||||
|
if ( Array.isArray(r) ) {
|
||||||
|
return r[0];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var regexFromHostname = function(details) {
|
||||||
|
// If target hostname has no script tag filter, no point querying
|
||||||
|
// chrome process.
|
||||||
|
var hostnames = getScriptTagHostnames();
|
||||||
|
if ( !hostnames ) { return; }
|
||||||
|
var hn = details.frameHostname, pos, entity;
|
||||||
|
for (;;) {
|
||||||
|
if ( hostnames.has(hn) ) {
|
||||||
|
return getScriptTagFilters(details);
|
||||||
|
}
|
||||||
|
pos = hn.indexOf('.');
|
||||||
|
if ( pos === -1 ) { break; }
|
||||||
|
entity = hn.slice(0, pos) + '.*';
|
||||||
|
if ( hostnames.has(entity) ) {
|
||||||
|
return getScriptTagFilters(details);
|
||||||
|
}
|
||||||
|
hn = hn.slice(pos + 1);
|
||||||
|
if ( hn === '' ) { break; }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var reset = function() {
|
||||||
|
scriptTagHostnames = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
get: regexFromHostname,
|
||||||
|
listener: listener,
|
||||||
|
reset: reset
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
@ -305,18 +385,9 @@ var contentObserver = {
|
||||||
wantXHRConstructor: false
|
wantXHRConstructor: false
|
||||||
});
|
});
|
||||||
|
|
||||||
if ( getChildProcessMessageManager() ) {
|
sandbox.getScriptTagFilters = function(details) {
|
||||||
sandbox.rpc = function(details) {
|
return scriptTagFilterer.get(details);
|
||||||
var cpmm = getChildProcessMessageManager();
|
};
|
||||||
if ( !cpmm ) { return; }
|
|
||||||
var r = cpmm.sendSyncMessage(rpcEmitterName, details);
|
|
||||||
if ( Array.isArray(r) ) {
|
|
||||||
return r[0];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
sandbox.rpc = function() {};
|
|
||||||
}
|
|
||||||
|
|
||||||
sandbox.injectScript = function(script) {
|
sandbox.injectScript = function(script) {
|
||||||
let svc = Services;
|
let svc = Services;
|
||||||
|
@ -344,6 +415,8 @@ var contentObserver = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sandbox.topContentScript = win === win.top;
|
||||||
|
|
||||||
// The goal is to have content scripts removed from web pages. This
|
// The goal is to have content scripts removed from web pages. This
|
||||||
// helps remove traces of uBlock from memory when disabling/removing
|
// helps remove traces of uBlock from memory when disabling/removing
|
||||||
// the addon.
|
// the addon.
|
||||||
|
@ -353,15 +426,15 @@ var contentObserver = {
|
||||||
sandbox.outerShutdown = function() {
|
sandbox.outerShutdown = function() {
|
||||||
sandbox.removeMessageListener();
|
sandbox.removeMessageListener();
|
||||||
sandbox.addMessageListener =
|
sandbox.addMessageListener =
|
||||||
|
sandbox.getScriptTagFilters =
|
||||||
sandbox.injectCSS =
|
sandbox.injectCSS =
|
||||||
sandbox.injectScript =
|
sandbox.injectScript =
|
||||||
sandbox.outerShutdown =
|
sandbox.outerShutdown =
|
||||||
sandbox.removeCSS =
|
sandbox.removeCSS =
|
||||||
sandbox.removeMessageListener =
|
sandbox.removeMessageListener =
|
||||||
sandbox.rpc =
|
|
||||||
sandbox.sendAsyncMessage = function(){};
|
sandbox.sendAsyncMessage = function(){};
|
||||||
sandbox.vAPI = {};
|
sandbox.vAPI = {};
|
||||||
messager = null;
|
messager = sandbox = null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -380,13 +453,21 @@ var contentObserver = {
|
||||||
callback(message.data);
|
callback(message.data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sandbox._broadcastListener_ = function(message) {
|
||||||
|
// https://github.com/gorhill/uBlock/issues/2014
|
||||||
|
if ( sandbox.topContentScript ) {
|
||||||
|
scriptTagFilterer.listener(message);
|
||||||
|
}
|
||||||
|
callback(message.data);
|
||||||
|
};
|
||||||
|
|
||||||
messager.addMessageListener(
|
messager.addMessageListener(
|
||||||
sandbox._sandboxId_,
|
sandbox._sandboxId_,
|
||||||
sandbox._messageListener_
|
sandbox._messageListener_
|
||||||
);
|
);
|
||||||
messager.addMessageListener(
|
messager.addMessageListener(
|
||||||
hostName + ':broadcast',
|
hostName + ':broadcast',
|
||||||
sandbox._messageListener_
|
sandbox._broadcastListener_
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -401,13 +482,13 @@ var contentObserver = {
|
||||||
);
|
);
|
||||||
messager.removeMessageListener(
|
messager.removeMessageListener(
|
||||||
hostName + ':broadcast',
|
hostName + ':broadcast',
|
||||||
sandbox._messageListener_
|
sandbox._broadcastListener_
|
||||||
);
|
);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
// It throws sometimes, mostly when the popup closes
|
// It throws sometimes, mostly when the popup closes
|
||||||
}
|
}
|
||||||
|
|
||||||
sandbox._messageListener_ = null;
|
sandbox._messageListener_ = sandbox._broadcastListener_ = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
return sandbox;
|
return sandbox;
|
||||||
|
@ -498,6 +579,14 @@ var contentObserver = {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
var processObserver = {
|
||||||
|
start: function() {
|
||||||
|
scriptTagFilterer.reset();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
var LocationChangeListener = function(docShell, webProgress) {
|
var LocationChangeListener = function(docShell, webProgress) {
|
||||||
var mm = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
var mm = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIContentFrameMessageManager);
|
.getInterface(Ci.nsIContentFrameMessageManager);
|
||||||
|
|
|
@ -23,21 +23,16 @@
|
||||||
|
|
||||||
// https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Frame_script_environment
|
// https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Frame_script_environment
|
||||||
|
|
||||||
(function() {
|
(function(context) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
let {LocationChangeListener} = Components.utils.import(
|
if ( !context.docShell ) {
|
||||||
Components.stack.filename.replace('Script', 'Module'),
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if ( !this.docShell ) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let webProgress = this.docShell
|
let webProgress = context.docShell
|
||||||
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||||
.getInterface(Components.interfaces.nsIWebProgress);
|
.getInterface(Components.interfaces.nsIWebProgress);
|
||||||
if ( !webProgress ) {
|
if ( !webProgress ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -49,11 +44,19 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let {LocationChangeListener} = Components.utils.import(
|
||||||
|
Components.stack.filename.replace('Script', 'Module'),
|
||||||
|
null
|
||||||
|
);
|
||||||
|
|
||||||
// https://github.com/gorhill/uBlock/issues/1444
|
// https://github.com/gorhill/uBlock/issues/1444
|
||||||
// Apparently, on older versions of Firefox (31 and less), the same context
|
// Apparently, on older versions of Firefox (31 and less), the same context
|
||||||
// is used for all extensions, hence we must use a unique variable name to
|
// is used for all frame scripts, hence we must use a unique variable name
|
||||||
// ensure no collision.
|
// to ensure no collision.
|
||||||
this.ublock0LocationChangeListener = new LocationChangeListener(this.docShell, webProgress);
|
context.ublock0LocationChangeListener = new LocationChangeListener(
|
||||||
}).call(this);
|
context.docShell,
|
||||||
|
webProgress
|
||||||
|
);
|
||||||
|
})(this);
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -1760,16 +1760,15 @@ vAPI.messaging.setup = function(defaultHandler) {
|
||||||
}
|
}
|
||||||
this.defaultHandler = defaultHandler;
|
this.defaultHandler = defaultHandler;
|
||||||
|
|
||||||
this.globalMessageManager.addMessageListener(
|
var gmm = this.globalMessageManager;
|
||||||
|
gmm.addMessageListener(
|
||||||
location.host + ':background',
|
location.host + ':background',
|
||||||
this.onMessage
|
this.onMessage
|
||||||
);
|
);
|
||||||
|
gmm.loadFrameScript(this.frameScriptURL, true);
|
||||||
this.globalMessageManager.loadFrameScript(this.frameScriptURL, true);
|
|
||||||
|
|
||||||
cleanupTasks.push(function() {
|
cleanupTasks.push(function() {
|
||||||
var gmm = vAPI.messaging.globalMessageManager;
|
var gmm = vAPI.messaging.globalMessageManager;
|
||||||
|
|
||||||
gmm.broadcastAsyncMessage(
|
gmm.broadcastAsyncMessage(
|
||||||
location.host + ':broadcast',
|
location.host + ':broadcast',
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
@ -1778,13 +1777,11 @@ vAPI.messaging.setup = function(defaultHandler) {
|
||||||
msg: { cmd: 'shutdownSandbox' }
|
msg: { cmd: 'shutdownSandbox' }
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
gmm.removeDelayedFrameScript(vAPI.messaging.frameScriptURL);
|
gmm.removeDelayedFrameScript(vAPI.messaging.frameScriptURL);
|
||||||
gmm.removeMessageListener(
|
gmm.removeMessageListener(
|
||||||
location.host + ':background',
|
location.host + ':background',
|
||||||
vAPI.messaging.onMessage
|
vAPI.messaging.onMessage
|
||||||
);
|
);
|
||||||
|
|
||||||
vAPI.messaging.defaultHandler = null;
|
vAPI.messaging.defaultHandler = null;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1820,8 +1817,9 @@ vAPI.messaging.broadcast = function(message) {
|
||||||
// https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Message_Manager/Message_manager_overview#Content_frame_message_manager
|
// https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Message_Manager/Message_manager_overview#Content_frame_message_manager
|
||||||
|
|
||||||
vAPI.rpcReceiver = (function() {
|
vAPI.rpcReceiver = (function() {
|
||||||
var calls = Object.create(null);
|
var calls = Object.create(null),
|
||||||
var childProcessMessageName = location.host + ':child-process-message';
|
childProcessMessageName = location.host + ':child-process-message',
|
||||||
|
processScriptURL = vAPI.getURL('processScript.js');
|
||||||
|
|
||||||
var onChildProcessMessage = function(ev) {
|
var onChildProcessMessage = function(ev) {
|
||||||
var msg = ev.data;
|
var msg = ev.data;
|
||||||
|
@ -1838,22 +1836,31 @@ vAPI.rpcReceiver = (function() {
|
||||||
if ( ppmm ) {
|
if ( ppmm ) {
|
||||||
ppmm = ppmm.getService(Ci.nsIMessageListenerManager);
|
ppmm = ppmm.getService(Ci.nsIMessageListenerManager);
|
||||||
}
|
}
|
||||||
|
if ( !ppmm ) {
|
||||||
|
return calls;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ppmm ) {
|
// https://github.com/gorhill/uBlock/issues/2014
|
||||||
ppmm.addMessageListener(
|
// Not supported on older versions of Firefox.
|
||||||
|
if ( ppmm.loadProcessScript instanceof Function ) {
|
||||||
|
ppmm.loadProcessScript(processScriptURL, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
ppmm.addMessageListener(
|
||||||
|
childProcessMessageName,
|
||||||
|
onChildProcessMessage
|
||||||
|
);
|
||||||
|
|
||||||
|
cleanupTasks.push(function() {
|
||||||
|
if ( ppmm.removeDelayedProcessScript instanceof Function ) {
|
||||||
|
ppmm.removeDelayedProcessScript(processScriptURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
ppmm.removeMessageListener(
|
||||||
childProcessMessageName,
|
childProcessMessageName,
|
||||||
onChildProcessMessage
|
onChildProcessMessage
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
cleanupTasks.push(function() {
|
|
||||||
if ( ppmm ) {
|
|
||||||
ppmm.removeMessageListener(
|
|
||||||
childProcessMessageName,
|
|
||||||
onChildProcessMessage
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return calls;
|
return calls;
|
||||||
|
|
|
@ -45,13 +45,6 @@ if ( document instanceof HTMLDocument === false ) {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
// Not all sandboxes are given an rpc function, so assign a dummy one if it is
|
|
||||||
// missing -- this avoids the need for testing before use.
|
|
||||||
|
|
||||||
self.rpc = self.rpc || function(){};
|
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
var vAPI = self.vAPI = self.vAPI || {};
|
var vAPI = self.vAPI = self.vAPI || {};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -154,12 +147,14 @@ vAPI.shutdown = (function() {
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
if ( !self.getScriptTagFilters ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var hostname = location.hostname;
|
var hostname = location.hostname;
|
||||||
if ( !hostname ) {
|
if ( !hostname ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var filters = self.rpc({
|
var filters = self.getScriptTagFilters({
|
||||||
fnName: 'getScriptTagFilters',
|
|
||||||
rootURL: self.location.href,
|
rootURL: self.location.href,
|
||||||
frameURL: self.location.href,
|
frameURL: self.location.href,
|
||||||
frameHostname: hostname
|
frameHostname: hostname
|
||||||
|
|
|
@ -42,7 +42,7 @@ var hasCachedContent = false;
|
||||||
|
|
||||||
var onMessage = function(msg) {
|
var onMessage = function(msg) {
|
||||||
switch ( msg.what ) {
|
switch ( msg.what ) {
|
||||||
case 'allFilterListsReloaded':
|
case 'staticFilteringDataChanged':
|
||||||
renderFilterLists();
|
renderFilterLists();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1237,6 +1237,12 @@ FilterContainer.prototype.createScriptTagFilter = function(hash, hostname, selec
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
FilterContainer.prototype.retrieveScriptTagHostnames = function() {
|
||||||
|
return Object.keys(this.scriptTagFilters);
|
||||||
|
};
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
FilterContainer.prototype.retrieveScriptTagRegex = function(domain, hostname) {
|
FilterContainer.prototype.retrieveScriptTagRegex = function(domain, hostname) {
|
||||||
if ( this.scriptTagFilterCount === 0 ) {
|
if ( this.scriptTagFilterCount === 0 ) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
uBlock Origin - a browser extension to block requests.
|
uBlock Origin - a browser extension to block requests.
|
||||||
Copyright (C) 2015 Raymond Hill
|
Copyright (C) 2015-2016 Raymond Hill
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -19,14 +19,12 @@
|
||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* global vAPI, µBlock */
|
'use strict';
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
if ( typeof vAPI.rpcReceiver !== 'object' ) {
|
if ( typeof vAPI.rpcReceiver !== 'object' ) {
|
||||||
|
@ -35,12 +33,19 @@ if ( typeof vAPI.rpcReceiver !== 'object' ) {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
vAPI.rpcReceiver.getScriptTagHostnames = function() {
|
||||||
|
var µb = µBlock;
|
||||||
|
var cfe = µb.cosmeticFilteringEngine;
|
||||||
|
if ( !cfe ) { return; }
|
||||||
|
return cfe.retrieveScriptTagHostnames();
|
||||||
|
};
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
vAPI.rpcReceiver.getScriptTagFilters = function(details) {
|
vAPI.rpcReceiver.getScriptTagFilters = function(details) {
|
||||||
var µb = µBlock;
|
var µb = µBlock;
|
||||||
var cfe = µb.cosmeticFilteringEngine;
|
var cfe = µb.cosmeticFilteringEngine;
|
||||||
if ( !cfe ) {
|
if ( !cfe ) { return; }
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Fetching the script tag filters first: assuming it is faster than
|
// Fetching the script tag filters first: assuming it is faster than
|
||||||
// checking whether the site is whitelisted.
|
// checking whether the site is whitelisted.
|
||||||
var hostname = details.frameHostname;
|
var hostname = details.frameHostname;
|
||||||
|
|
|
@ -406,7 +406,8 @@
|
||||||
|
|
||||||
//quickProfiler.stop(0);
|
//quickProfiler.stop(0);
|
||||||
|
|
||||||
vAPI.messaging.broadcast({ what: 'allFilterListsReloaded' });
|
vAPI.messaging.broadcast({ what: 'staticFilteringDataChanged' });
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
|
|
||||||
µb.selfieManager.create();
|
µb.selfieManager.create();
|
||||||
|
|
|
@ -25,6 +25,7 @@ cp platform/firefox/css/* $DES/css/
|
||||||
cp platform/firefox/polyfill.js $DES/js/
|
cp platform/firefox/polyfill.js $DES/js/
|
||||||
cp platform/firefox/vapi-*.js $DES/js/
|
cp platform/firefox/vapi-*.js $DES/js/
|
||||||
cp platform/firefox/bootstrap.js $DES/
|
cp platform/firefox/bootstrap.js $DES/
|
||||||
|
cp platform/firefox/processScript.js $DES/
|
||||||
cp platform/firefox/frame*.js $DES/
|
cp platform/firefox/frame*.js $DES/
|
||||||
cp -R platform/firefox/img $DES/
|
cp -R platform/firefox/img $DES/
|
||||||
cp platform/firefox/chrome.manifest $DES/
|
cp platform/firefox/chrome.manifest $DES/
|
||||||
|
|
Loading…
Reference in New Issue