diff options
Diffstat (limited to 'src/bg')
-rw-r--r-- | src/bg/RequestUtil.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bg/RequestUtil.js b/src/bg/RequestUtil.js index 659fd33..8a6e621 100644 --- a/src/bg/RequestUtil.js +++ b/src/bg/RequestUtil.js @@ -99,10 +99,9 @@ return; } - if (request.type === "main_frame" - && /^(?:application|text)\//.test(contentType) + if (/^(?:application|text)\//.test(contentType) && !/[^;]+\b(html|xml)\b/i.test(contentType)) { - debug("Not HTML, but top-level document: defer script to onResponseStarted for %s (%o)", url, response); + debug("Not HTML: defer script to onResponseStarted for %s (%o)", url, response); return; } |