mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Safari: XHR should explicitly fail. Fixes #878
This commit is contained in:
parent
bd0e07bef2
commit
83975124a4
1 changed files with 3 additions and 4 deletions
|
@ -236,7 +236,6 @@ return e.detail.url === false;\
|
|||
wo = open,\
|
||||
xo = XMLHttpRequest.prototype.open,\
|
||||
img = Image;\
|
||||
_noOP = function(){};\
|
||||
Image = function() {\
|
||||
var x = new img();\
|
||||
Object.defineProperty(x, 'src', {\
|
||||
|
@ -252,9 +251,9 @@ return x;\
|
|||
open = function(u) {\
|
||||
return block(u, 'popup') ? null : wo.apply(this, arguments);\
|
||||
};\
|
||||
XMLHttpRequest.prototype.open = function(m, u, s) {\
|
||||
if(block(u, 'xmlhttprequest')) return {send: _noOP};\
|
||||
else return xo.apply(this, arguments);\
|
||||
XMLHttpRequest.prototype.open = function(m, u) {\
|
||||
if(block(u, 'xmlhttprequest')) {throw 'InvalidAccessError'; return;}\
|
||||
else {xo.apply(this, arguments); return;}\
|
||||
};";
|
||||
if(frameId === 0) {
|
||||
tmpScript += "\
|
||||
|
|
Loading…
Reference in a new issue