fixed CSP error with inline js

This commit is contained in:
2025-01-04 15:09:12 -08:00
parent dd01f7e5fa
commit 082389430e
3 changed files with 20 additions and 11 deletions
+3 -10
View File
@@ -22,14 +22,7 @@
<a href="{next_chapter_link}">{next_chapter_name}</a>
&rightarrow;
</div>
<script>
function make_shortcode(){{
var xmlHttp = new XMLHttpRequest();
var theUrl = "/mksc/" + document.getElementById("searchBar").value;
xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
xmlHttp.send( null );
document.getElementById("context_href").innerHTML = xmlHttp.responseText;
document.getElementById('context_href').setAttribute("href", "/" + xmlHttp.responseText);
}}
<script src="js/shortcode.js">
make_shortcode();
</script>
</header>
</header>