diff --git a/platform/safari/vapi-client.js b/platform/safari/vapi-client.js index 77979f260..4ff74e46a 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)) { - document.body.setAttribute("blocked", "true"); + document.documentElement.setAttribute("data-ublock-blocked", "true"); } }, true); var tmpJS = document.createElement("script"); @@ -251,9 +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.body.setAttribute('blocked', '');\ +"document.documentElement.setAttribute('data-ublock-blocked', '');\ document.dispatchEvent(e);\ -return !!document.body.getAttribute('blocked');\ +return !!document.documentElement.getAttribute('data-ublock-blocked');\ },\ wo = open,\ xo = XMLHttpRequest.prototype.open,\