From a46d085ff7b9dcd0997bcb686cbf39a1b9cf0c2e Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 25 Jul 2018 14:36:32 +0200 Subject: Fix for stalling embedded objects load on dynamic script injection. --- src/bg/RequestUtil.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/bg') 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; } -- cgit v1.2.3