1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

Safari: don't be lenient with XHR blocking

This commit is contained in:
Chris 2015-02-05 14:13:25 -07:00
parent c381183570
commit c9160fa753

View File

@ -230,12 +230,14 @@ dispatchEvent(e);\
return e.detail.url === false;\
},\
wo = open,\
xo = XMLHttpRequest.prototype.open;\
xo = XMLHttpRequest.prototype.open,\
_noOP = function(){};\
open = function(u) {\
return block(u, 'popup') ? null : wo.apply(this, arguments);\
};\
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) {
tmpScript += "\