fixed CSP error with inline js
This commit is contained in:
+3
-10
@@ -22,14 +22,7 @@
|
||||
<a href="{next_chapter_link}">{next_chapter_name}</a>
|
||||
→
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user