From bc11167941ed173a7af5e5d3875d64e31e25947d Mon Sep 17 00:00:00 2001 From: chrisaljoudi Date: Fri, 14 Aug 2015 21:42:54 -0600 Subject: [PATCH] Fixes #1518 --- platform/safari/vapi-client.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/safari/vapi-client.js b/platform/safari/vapi-client.js index 1f77f6142..77979f260 100644 --- a/platform/safari/vapi-client.js +++ b/platform/safari/vapi-client.js @@ -239,7 +239,7 @@ } document.addEventListener(vAPI.sessionId, function(e) { if(shouldBlockDetailedRequest(e.detail)) { - e.detail.url = false; + document.body.setAttribute("blocked", "true"); } }, true); var tmpJS = document.createElement("script"); @@ -251,8 +251,9 @@ var block = function(u, t) {" + e.initCustomEvent('" + vAPI.sessionId + "', false, false, {url: u, type: t});" : "var e = new CustomEvent('" + vAPI.sessionId + "', {bubbles: false, detail: {url: u, type: t}});" ) + -"document.dispatchEvent(e);\ -return e.detail.url === false;\ +"document.body.setAttribute('blocked', '');\ +document.dispatchEvent(e);\ +return !!document.body.getAttribute('blocked');\ },\ wo = open,\ xo = XMLHttpRequest.prototype.open,\