I made a code and then I ran a scanner and it gave the code the site with a gap, I can not find where the error is and whether it is recorded or not. Here's the code:
var $K2 = jQuery.noConflict();
$K2(document).ready(function(){
// Generic function to get URL params passed in .js script include
function getUrlParams(targetScript, varName) {
var scripts = document.getElementsByTagName('script');
var scriptCount = scripts.length;
for (var a = 0; a < scriptCount; a++) {
var scriptSrc = scripts[a].src;
if (scriptSrc.indexOf(targetScript) >= 0) {
varName = varName.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var re = new RegExp("[\?&]" + varName + "=([^&#]*)");
var parsedVariables = re.exec(scriptSrc);
if (parsedVariables !== null) {
return parsedVariables[1];
}
}
}
}