From c9160fa7534a6c1320e44c88a52147409d56bc87 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 5 Feb 2015 14:13:25 -0700 Subject: [PATCH] Safari: don't be lenient with XHR blocking --- platform/safari/vapi-client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/safari/vapi-client.js b/platform/safari/vapi-client.js index ee9ee695e..5ba2d1497 100644 --- a/platform/safari/vapi-client.js +++ b/platform/safari/vapi-client.js @@ -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 += "\