MyXssMagic = new function() { var BASE_URL = 'https://www.macroaxis.com/widgets/'; var STYLESHEET = BASE_URL + "x.css" var CONTENT_URL = BASE_URL + 'content.jsp'; var ROOT = 'my_xss_magic'; //alert(BASE_URL); function requestStylesheet(stylesheet_url) { stylesheet = document.createElement("link"); stylesheet.rel = "stylesheet"; stylesheet.type = "text/css"; stylesheet.href = stylesheet_url; stylesheet.media = "all"; document.lastChild.firstChild.appendChild(stylesheet); } function requestContent( local ) { var script = document.createElement('script'); script.src = CONTENT_URL + '?t=45&f=f&url=' + escape(local || location.href)+''; document.getElementsByTagName('head')[0].appendChild(script); } this.init = function() { this.serverResponse = function(data) { if (!data) return; var div = document.getElementById(ROOT); var txt = ""; txt = data[0]; if(txt =='0') { div.innerHTML = "Configuration Error: Contact us at support@macroaxis.com to resolve this issue"; } else { div.innerHTML = " "; } div.style.display = 'block'; // make element visible div.style.visibility = 'visible'; // make element visible } // requestStylesheet(STYLESHEET); document.write("
"); requestContent(); var no_script = document.getElementById('no_script'); if (no_script) { no_script.style.display = 'none'; } } } MyXssMagic.init();