mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-23 02:42:41 +01:00
this fixes #18
This commit is contained in:
parent
036776455b
commit
51463bc796
@ -30,15 +30,6 @@
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
var typeToRedirectPathMap = {
|
||||
'stylesheet': chrome.runtime.getURL('css/noop.css'),
|
||||
'image': chrome.runtime.getURL('img/noop.png'),
|
||||
'script': chrome.runtime.getURL('js/noop.js'),
|
||||
'sub_frame': 'about:blank'
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
// Intercept and filter web requests according to white and black lists.
|
||||
|
||||
var onBeforeRequestHandler = function(details) {
|
||||
@ -103,11 +94,9 @@ var onBeforeRequestHandler = function(details) {
|
||||
// Blocked
|
||||
//console.debug('µBlock> onBeforeRequestHandler()> BLOCK "%s" because "%s"', details.url, reason);
|
||||
|
||||
// Redirect to noop versions whenever possible.
|
||||
var redirectPath = typeToRedirectPathMap[requestType];
|
||||
if ( redirectPath ) {
|
||||
return { 'redirectUrl': redirectPath };
|
||||
}
|
||||
// https://github.com/gorhill/uBlock/issues/18
|
||||
// Do not use redirection, we need to block outright to be sure the request
|
||||
// will not be made. There can be no such guarantee with redirection.
|
||||
|
||||
return { 'cancel': true };
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "__MSG_extName__",
|
||||
"short_name": "µBlock",
|
||||
"version": "0.1.0.8",
|
||||
"version": "0.1.0.9",
|
||||
"description": "__MSG_extShortDesc__",
|
||||
"icons": {
|
||||
"16": "img/icon_16.png",
|
||||
|
Loading…
Reference in New Issue
Block a user