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';
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=42&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 if(txt =='2')
{
div.innerHTML = " ";
}
else
{
div.innerHTML = "Invalid Widget License: Get the correct widget code Here
"+
"If you think you reached this message by an error and you have correct license for this widget, please contact us at support@macroaxis.com to resolve this issue.";
}
div.style.display = 'block'; // make element visible
div.style.visibility = 'visible'; // make element visible
}
document.write("