Просмотр исходного кода

fix CSP error by using a data URI (see #706)

Gildas 4 лет назад
Родитель
Сommit
1811612860
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/single-file/processors/hooks/content/content-hooks-frames.js

+ 1 - 1
lib/single-file/processors/hooks/content/content-hooks-frames.js

@@ -60,7 +60,7 @@ if (document instanceof HTMLDocument) {
 			}
 		});
 		let scriptElement = document.createElement("script");
-		scriptElement.textContent = "(" + injectedScript.toString() + ")()";
+		scriptElement.src = "data:," + "(" + injectedScript.toString() + ")()";
 		(document.documentElement || document).appendChild(scriptElement);
 		scriptElement.remove();
 		scriptElement = document.createElement("script");