From dcb6e87c1f8dd8686c39d3d7b1b6aefbabb72807 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 14 Jul 2016 09:35:38 -0400 Subject: [PATCH] fix https://forums.lanik.us/viewtopic.php?f=64&t=31522 --- platform/chromium/vapi-client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/chromium/vapi-client.js b/platform/chromium/vapi-client.js index e6b9c5249..78891bf96 100644 --- a/platform/chromium/vapi-client.js +++ b/platform/chromium/vapi-client.js @@ -47,7 +47,10 @@ if ( document instanceof HTMLDocument === false ) { // https://github.com/gorhill/uBlock/issues/1124 // Looks like `contentType` is on track to be standardized: // https://dom.spec.whatwg.org/#concept-document-content-type -if ( (document.contentType || '').lastIndexOf('image/', 0) === 0 ) { +// https://forums.lanik.us/viewtopic.php?f=64&t=31522 +// Skip text/plain documents. +var contentType = document.contentType || ''; +if ( /^image\/|^text\/plain/.test(contentType) ) { return; }