diff options
author | hackademix | 2018-07-25 14:36:32 +0200 |
---|---|---|
committer | hackademix | 2018-07-25 14:36:32 +0200 |
commit | a46d085ff7b9dcd0997bcb686cbf39a1b9cf0c2e (patch) | |
tree | e7a3a1d514aaffe22d2315b59b34cfcd47626a99 /src | |
parent | d88a0cf6d76408be4455d8e6a1ba5cb55bd6b8b7 (diff) | |
download | noscript-a46d085ff7b9dcd0997bcb686cbf39a1b9cf0c2e.tar.gz noscript-a46d085ff7b9dcd0997bcb686cbf39a1b9cf0c2e.tar.xz noscript-a46d085ff7b9dcd0997bcb686cbf39a1b9cf0c2e.zip |
Fix for stalling embedded objects load on dynamic script injection.
Diffstat (limited to 'src')
-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; } |