From ae3cc5cf6c67e00ab5699be092c2a9ec67a5d604 Mon Sep 17 00:00:00 2001 From: fabianpimminger Date: Tue, 23 Feb 2021 09:34:53 +0100 Subject: [PATCH] fix: bug with script injection --- src/js/CookieFox.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/CookieFox.svelte b/src/js/CookieFox.svelte index 2c03e29..ca7236f 100644 --- a/src/js/CookieFox.svelte +++ b/src/js/CookieFox.svelte @@ -83,7 +83,7 @@ newScript.text = script.innerHTML; let k = -1, attrs = script.attributes, attr; while ( ++k < attrs.length ) { - script.setAttribute( (attr = attrs[k]).name, attr.value ); + newScript.setAttribute( (attr = attrs[k]).name, attr.value ); } script.parentNode.replaceChild(newScript, script); });