[ad_1]
Fetching more content…
Fetching more content…
“,
““,
““,
];
function displayNativeAds()
googletag.cmd.push(function() googletag.display(‘div-gpt-ad-1520416573698-0’); );
googletag.cmd.push(function() googletag.display(‘div-gpt-ad-1520507866383-0’); );
googletag.cmd.push(function() googletag.display(‘div-gpt-ad-1520507954168-0’); );
//to place ads on 3rd, 8th, 13th (and so on) positions
var index = 2;
//generating native Ads div array
var nativeAdsDiv = ;
for(var i=0; i
‘);
storiesList.insertAdjacentHTML(‘beforeend’, ‘
End Page ‘ + pageNumber + ‘
‘);
window.addEventListener(“scroll”, onWindowScroll);
function onWindowScroll(e) , function (error)
console.log(error);
infiniteScrollRequestInProgress = false;
timelineLoadingDivTop.style.display = ‘none’;
timelineLoadingDivBottom.style.display = ‘none’;
);
}
else
infiniteScrollRequestInProgress = false;
}
}
}
function checkVisible(elm)
var rect = elm.getBoundingClientRect();
var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
return !(rect.bottom = 0);
function updateURL(page_no)
var querystring = window.location.search;
var hash = window.location.hash;
//remove hash (and any trailing #) from url
var url = window.location.href.replace(hash, ”).replace(/#+$/,”);
if(querystring != ”)
url = url.replace(querystring, ‘?page=’+page_no);
else
url += ‘?page=’+page_no;
url += hash;
if(window.location.href != url)
window.history.replaceState(“visible_page”, “Page ” + page_no, url);
return url;
function updateLinksAndMeta(page_no)
//update title and meta description
if(page_no == 1)
//remove page no
document.title = (document.title).replace(/Page [0-9]+ – /g, “”);
if(meta_description)
meta_description.content = (meta_description.content).replace(/Page [0-9]+ – /g, “”);
else if(page_no > 1)
if((document.title).match(/Page [0-9]+/g) != null)
document.title = (document.title).replace(/Page [0-9]+/g, “Page ” + page_no);
else
document.title = ‘Page ‘ + page_no + ‘ – ‘ + document.title;
if(meta_description)
if((meta_description.content).match(/Page [0-9]+/g) != null)
meta_description.content = (meta_description.content).replace(/Page [0-9]+/g, “Page ” + page_no);
else
meta_description.content = ‘Page ‘ + page_no + ‘ – ‘ + meta_description.content;
if(canonical)
function updateCricketScore(story, data)
data = JSON.parse(data);
var match = data[‘score_strip’][0][‘currently_batting’] ? data[‘score_strip’][0] : null;
if (match == null)
match = data[‘score_strip’][1][‘currently_batting’] ? data[‘score_strip’][1] : null;
if (match != null)
story.innerHTML = match[‘short_name’] + ‘ ‘ + match[‘score’];
else YET TO START’;
function refreshScores() {
var stories = $all(‘[data-scoreid]’);
for (var i = 0; i
[ad_2]
Source link Interesting