From 579c4a1d5ec069360e0679a6ebf4f157b519668c Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 29 May 2015 16:40:59 -0400 Subject: [PATCH] this fixes #260 --- platform/firefox/frameModule.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js index 2e9c52ba8..195088cf1 100644 --- a/platform/firefox/frameModule.js +++ b/platform/firefox/frameModule.js @@ -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:' ) {