mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-16 23:42:39 +01:00
Fixes #1521
This commit is contained in:
parent
4bd9c53339
commit
ea03d92020
@ -239,7 +239,7 @@
|
|||||||
}
|
}
|
||||||
document.addEventListener(vAPI.sessionId, function(e) {
|
document.addEventListener(vAPI.sessionId, function(e) {
|
||||||
if(shouldBlockDetailedRequest(e.detail)) {
|
if(shouldBlockDetailedRequest(e.detail)) {
|
||||||
document.body.setAttribute("blocked", "true");
|
document.documentElement.setAttribute("data-ublock-blocked", "true");
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
var tmpJS = document.createElement("script");
|
var tmpJS = document.createElement("script");
|
||||||
@ -251,9 +251,9 @@ var block = function(u, t) {" +
|
|||||||
e.initCustomEvent('" + vAPI.sessionId + "', false, false, {url: u, type: t});"
|
e.initCustomEvent('" + vAPI.sessionId + "', false, false, {url: u, type: t});"
|
||||||
: "var e = new CustomEvent('" + vAPI.sessionId + "', {bubbles: false, detail: {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);\
|
document.dispatchEvent(e);\
|
||||||
return !!document.body.getAttribute('blocked');\
|
return !!document.documentElement.getAttribute('data-ublock-blocked');\
|
||||||
},\
|
},\
|
||||||
wo = open,\
|
wo = open,\
|
||||||
xo = XMLHttpRequest.prototype.open,\
|
xo = XMLHttpRequest.prototype.open,\
|
||||||
|
Loading…
Reference in New Issue
Block a user