From a4f088211e3b8c274d1755d542fac737679d7a56 Mon Sep 17 00:00:00 2001 From: hackademix Date: Sat, 15 Jun 2019 20:41:26 +0200 Subject: Fixed regression in full embedding document replacement due to timing changes. --- src/content/PlaceHolder.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/content/PlaceHolder.js') diff --git a/src/content/PlaceHolder.js b/src/content/PlaceHolder.js index 8f31951..8f57b4f 100644 --- a/src/content/PlaceHolder.js +++ b/src/content/PlaceHolder.js @@ -119,10 +119,14 @@ var PlaceHolder = (() => { let replacement = createHTMLElement("a"); replacement.className = "__NoScript_PlaceHolder__"; cloneStyle(element, replacement); - replacement.style.backgroundImage = `url(${ICON_URL})`; + let setImage = () => replacement.style.backgroundImage = `url(${ICON_URL})`; if (ns.embeddingDocument) { replacement.classList.add("document"); + window.stop(); + setTimeout(setImage, 0); // defer to bypass window.stop(); + } else { + setImage(); } replacement.href = url; -- cgit v1.2.3