mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
this fixes #260
This commit is contained in:
parent
885c68495b
commit
579c4a1d5e
1 changed files with 11 additions and 0 deletions
|
@ -296,6 +296,17 @@ const contentObserver = {
|
|||
win.addEventListener('mousedown', this.ignorePopup, true);
|
||||
}
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/260
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/contentType
|
||||
// "Non-standard, only supported by Gecko. To be used in
|
||||
// "chrome code (i.e. Extensions and XUL applications)."
|
||||
// TODO: We may have to exclude more types, for now let's be
|
||||
// conservative and focus only on the one issue reported, i.e. let's
|
||||
// not test against 'text/html'.
|
||||
if ( doc.contentType.startsWith('image/') ) {
|
||||
return;
|
||||
}
|
||||
|
||||
let loc = win.location;
|
||||
|
||||
if ( loc.protocol !== 'http:' && loc.protocol !== 'https:' && loc.protocol !== 'file:' ) {
|
||||
|
|
Loading…
Reference in a new issue