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
1 changed files with 4 additions and 2 deletions

View File

@ -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 += "\