//Makarand : Extracting the Code part from URL
var getUrl = window.location.search.substring(1)
console.log(getUrl)
var splitUrl = getUrl.split("&");
console.log("-------------------")
console.log(splitUrl)
console.log("-------------------")
console.log(splitUrl[3])
var urlParam = splitUrl[3].split("code=");
//Makarand : Getting the original code back
var splitNew =urlParam[1].replaceAll("%20"," ")
var splitNew2 =splitNew.replaceAll("%3C","<")
var splitNew3 =splitNew2.replaceAll("%3E",">")
console.log("======")
console.log(splitNew3)
//Makarand : To insert the script in body of the webpage
function runP5Code(p5Code) {
// Create a script element
var script = document.createElement('script');
script.text = p5Code;
// Append the script to the HTML document
//document.getElementById("them").appendChild(script);
document.body.appendChild(script);
}
setTimeout(runP5Code(splitNew3),10);