mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 17:49:39 +02:00
Safari: don't be lenient with XHR blocking
This commit is contained in:
parent
c381183570
commit
c9160fa753
@ -230,12 +230,14 @@ dispatchEvent(e);\
|
|||||||
return e.detail.url === false;\
|
return e.detail.url === false;\
|
||||||
},\
|
},\
|
||||||
wo = open,\
|
wo = open,\
|
||||||
xo = XMLHttpRequest.prototype.open;\
|
xo = XMLHttpRequest.prototype.open,\
|
||||||
|
_noOP = function(){};\
|
||||||
open = function(u) {\
|
open = function(u) {\
|
||||||
return block(u, 'popup') ? null : wo.apply(this, arguments);\
|
return block(u, 'popup') ? null : wo.apply(this, arguments);\
|
||||||
};\
|
};\
|
||||||
XMLHttpRequest.prototype.open = function(m, u, s) {\
|
XMLHttpRequest.prototype.open = function(m, u, s) {\
|
||||||
return xo.apply(this, block(u, 'xmlhttprequest') ? ['HEAD', u, s] : arguments);\
|
if(block(u, 'xmlhttprequest')) return {send: _noOP};\
|
||||||
|
else return xo.apply(this, arguments);\
|
||||||
};";
|
};";
|
||||||
if(frameId === 0) {
|
if(frameId === 0) {
|
||||||
tmpScript += "\
|
tmpScript += "\
|
||||||
|
Loading…
Reference in New Issue
Block a user