From 4919b219a798af68652e6d4331c048194d76b5db Mon Sep 17 00:00:00 2001 From: hackademix Date: Sat, 26 Sep 2020 23:55:45 +0200 Subject: [PATCH] Fix browser UI for image, audio and video content being partially broken on file:// URLs. --- src/content/syncFetchPolicy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/syncFetchPolicy.js b/src/content/syncFetchPolicy.js index 38cf144..f925f19 100644 --- a/src/content/syncFetchPolicy.js +++ b/src/content/syncFetchPolicy.js @@ -15,7 +15,8 @@ }; debug("Initial readyState and body", document.readyState, document.body); - if (UA.isMozilla) { + let mustFreeze = UA.isMozilla && (!/^(?:image|video|audio)/.test(document.contentType) || document instanceof XMLDocument); + if (mustFreeze) { // Mozilla has already parsed the element, we must take extra steps... try {