mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 17:02:27 +02:00
https://github.com/chrisaljoudi/uBlock/issues/1528: apply fix to element picker
This commit is contained in:
parent
94a1d72fc8
commit
6600a27c33
@ -19,7 +19,7 @@
|
|||||||
Home: https://github.com/gorhill/uBlock
|
Home: https://github.com/gorhill/uBlock
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* global self, vAPI, CSS */
|
/* global self, vAPI, CSS, HTMLDocument, XMLDocument */
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
@ -120,6 +120,20 @@
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/464
|
||||||
|
if ( document instanceof HTMLDocument === false ) {
|
||||||
|
// https://github.com/chrisaljoudi/uBlock/issues/1528
|
||||||
|
// A XMLDocument can be a valid HTML document.
|
||||||
|
if (
|
||||||
|
document instanceof XMLDocument === false ||
|
||||||
|
document.createElement('div') instanceof HTMLDivElement === false
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
// don't run in frames
|
// don't run in frames
|
||||||
if ( window.top !== window ) {
|
if ( window.top !== window ) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user