var html = '';
var blockAd = false;
var blockUrlsStr = '';
var blockUrls = blockUrlsStr.split(",");
blockUrls.forEach(function(item, index){
if(item == undefined){
return false;
}
var windowUrl = window.location.href;
if(windowUrl == item){
blockAd = true;
return false;
}
});
var pageTitle = document.title;
var fileKeywords = [];
if(fileKeywords.length > 0){
for(i=0; i 1) ? 1 : fileNumber + 1;
adLink.setAttribute('fileNumber', fileNumber);
var url = 'https://phonroid.com/ads/view/129/true';
url += '/' + fileNumber;
url += '/'+document.title;
load(url, function(xhr) {
adLink.href = xhr.responseText;
});
}
function load(url, callback) {
var xhr;
if(typeof XMLHttpRequest !== 'undefined') xhr = new XMLHttpRequest();
else {
var versions = ["MSXML2.XmlHttp.5.0",
"MSXML2.XmlHttp.4.0",
"MSXML2.XmlHttp.3.0",
"MSXML2.XmlHttp.2.0",
"Microsoft.XmlHttp"]
for(var i = 0, len = versions.length; i < len; i++) {
try {
xhr = new ActiveXObject(versions[i]);
break;
}
catch(e){}
} // end for
}
xhr.onreadystatechange = ensureReadiness;
function ensureReadiness() {
if(xhr.readyState < 4) {
return;
}
if(xhr.status !== 200) {
return;
}
// all is well
if(xhr.readyState === 4) {
callback(xhr);
}
}
xhr.open('GET', url, true);
xhr.send('');
}
html += '';
if(!blockAd){
document.write(html);
}