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
+8
View File
@@ -0,0 +1,8 @@
function make_shortcode(){{
var xmlHttp = new XMLHttpRequest();
const 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);
}}