Wednesday, February 25, 2026
HomeNewsNagaland Sambad Lottery Result Today, 9-2-2026: 6 PM Dear Monday Weekly Lucky...

Nagaland Sambad Lottery Result Today, 9-2-2026: 6 PM Dear Monday Weekly Lucky Draw Winners List For 1 Crore

Nagaland Sambad Lottery Result Today, 9-2-2026: 6 PM Dear Monday Weekly Lucky Draw Winners List For 1 Crore

News

The Nagaland State Lottery Sambad has announced the results for the Dear RISE Monday Weekly Lottery for the Morning 1 PM and Day 6 PM draws on Monday, February 9, 2026, prompting participants to carefully verify their ticket numbers with the official result list. While the Evening 8 PM draw result is scheduled to be declared later at its respective timing.

Nagaland Sambad Lottery Result Today, 9-2-2026: 6PM Dear Monday Weekly Lucky Draw Winners List For 1 Crore Prize Money

Nagaland Sambad Results

State Lottery Result Today: Nagaland Dear Lottery 1PM Weekly Monday Lukcy Draw Winner

According to the official announcement, the Dear RISE MORNING 1 PM draw, which carries a top prize of Rs 1 crore, has been successfully conducted. The 1st prize-winning ticket number is 44J 90077.

The draw was held under government-approved supervision at P. R. Hill Junction, Kohima – 797001, ensuring transparency and adherence to established norms.

Each Nagaland Lottery ticket is priced at Rs 6, making it one of the most accessible government-authorised lottery schemes in the country. Winners are required to match their ticket numbers exactly with the published result list to claim prizes.

Know About Nagaland Sambad Lottery

The Nagaland State Lottery Sambad is a widely followed and legally authorised lottery scheme in India, known for its credibility and structured process. The lottery features three daily draws:

  • 1:00 PM – Morning Draw
  • 6:00 PM – Day Draw
  • 8:00 PM – Evening Draw

Results are generally released shortly after each draw, usually around 1:10 PM, 6:10 PM, and 8:10 PM IST, respectively.

While the Morning and Day draw results have already been declared, participants are now awaiting the 8 PM Evening draw, which will be announced later today.

Disclaimer: The views and recommendations expressed are solely those of the individual analysts or entities and do not reflect the views of Goodreturns.in or Greynium Information Technologies Private Limited (together referred as “we”). We do not guarantee, endorse or take responsibility for the accuracy, completeness or reliability of any content, nor do we provide any investment advice or solicit the purchase or sale of securities. All information is provided for informational and educational purposes only and should be independently verified from licensed financial advisors before making any investment decisions.

I-T Department Releases Draft Rules and Forms for New Income Tax Act 2025 Seeking Public Input

I-T Department Releases Draft Rules and Forms for New Income Tax Act 2025 Seeking Public Input

Opposition Considers Resolution to Remove Lok Sabha Speaker Om Birla Over Disallowed Discussions

Opposition Considers Resolution to Remove Lok Sabha Speaker Om Birla Over Disallowed Discussions

Planning A Trip To Canada? IRCC Cuts Short Visitor Visa Processing Time To 83 Days For Indian Visitors

Planning A Trip To Canada? IRCC Cuts Short Visitor Visa Processing Time To 83 Days For Indian Visitors

Indian Airlines Report Cumulative Loss of Rs 5,289.73 Crore in Financial Year 2024-25

Indian Airlines Report Cumulative Loss of Rs 5,289.73 Crore in Financial Year 2024-25

Aye Finance IPO Alert: Subscription Opens Feb 9; All You Need to Know About Price Band, GMP

Aye Finance IPO Alert: Subscription Opens Feb 9; All You Need to Know About Price Band, GMP

Stock Market Next Week February 9–13: Sensex, Nifty to Track RBI Signals, Global Cues and Earnings Trail End

Stock Market Next Week February 9–13: Sensex, Nifty to Track RBI Signals, Global Cues and Earnings Trail End

Trade Deal with US Provides Significant Boost to India's Economic Growth, States Amit Shah

Trade Deal with US Provides Significant Boost to India’s Economic Growth, States Amit Shah

Gold Rate In India Steady on Feb 8 After 12% Decline From Record High: Check 24K, 22K, 18K Rates On Sunday

Gold Rate In India Steady on Feb 8 After 12% Decline From Record High: Check 24K, 22K, 18K Rates On Sunday

Valentine's Day Bank Holiday Alert! Are Banks Shut on Feb 14 & 15? Check Full RBI Holiday List for February

Valentine’s Day Bank Holiday Alert! Are Banks Shut on Feb 14 & 15? Check Full RBI Holiday List for February

Why India’s Next Growth Phase Depends On NBFCs, Not Just Banks Post Budget 2026?

Why India’s Next Growth Phase Depends On NBFCs, Not Just Banks Post Budget 2026?

Bharat Taxi App Launched: How to Download, Register; Check Features, Prices; Comparison with Ola, Uber, Rapido

Bharat Taxi App Launched: How to Download, Register; Check Features, Prices; Comparison with Ola, Uber, Rapido

Union Budget 2026 Highlights Government's Commitment to Villages and Farmers, Says Rao Narbir Singh

Union Budget 2026 Highlights Government’s Commitment to Villages and Farmers, Says Rao Narbir Singh

  • Block for 8 hours

  • Block for 12 hours

  • Block for 24 hours

  • Don’t block

‘;
document.getElementById(‘article-social-promo’).innerHTML=socialArtPromo;
}
}
}

document.addEventListener(‘DOMContentLoaded’, function () {

var whatsappBtn = document.querySelector(‘.share-btn.whatsapp-icon’);
if (!whatsappBtn) return;

whatsappBtn.addEventListener(‘click’, function () {

var canonical = document.querySelector(‘link[rel=”canonical”]’);
var ogTitle = document.querySelector(‘meta[property=”og:title”]’);

if (!canonical || !ogTitle) return;

var social_url = canonical.href;
var social_title = ogTitle.content;

var whatsappUrl =
/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)
? `https://api.whatsapp.com/send?text=${encodeURIComponent(social_title)}%20${encodeURIComponent(social_url)}`
: `https://web.whatsapp.com/send?text=${encodeURIComponent(social_title)}%20${encodeURIComponent(social_url)}`;

window.open(whatsappUrl, ‘_blank’);
});

});

function SetYear() {
var thisDate=new Date();
var thisYear=thisDate.getFullYear();
document.getElementById(‘curYear’).innerHTML = thisYear;
}
if(document.getElementById(‘curYear’))
{
SetYear();
}

facebookview

‘;
}

(function() {
var hidden = “hidden”;
// Standards:
if (hidden in document)
document.addEventListener(“visibilitychange”, onchange);
else if ((hidden = “mozHidden”) in document)
document.addEventListener(“mozvisibilitychange”, onchange);
else if ((hidden = “webkitHidden”) in document)
document.addEventListener(“webkitvisibilitychange”, onchange);
else if ((hidden = “msHidden”) in document)
document.addEventListener(“msvisibilitychange”, onchange);
// IE 9 and lower:
else if (“onfocusin” in document)
document.onfocusin = document.onfocusout = onchange;
// All others:
else
window.onpageshow = window.onpagehide
= window.onfocus = window.onblur = onchange;

function onchange (evt) {
var v = “visible”, h = “hidden”,
evtMap = {
focus:v, focusin:v, pageshow:v, blur:h, focusout:h, pagehide:h
};

evt = evt || window.event;
if (evt.type in evtMap)
document.body.className = evtMap[evt.type];
else
document.body.className = this[hidden] ? “hidden” : “visible”;
}

// set the initial state (but only if browser supports the Page Visibility API)
if( document[hidden] !== undefined )
onchange({type: document[hidden] ? “blur” : “focus”});
})();

//For All DFP Name:ID into Global Array Push

var adElem = [];
var adObj = {};
googletag.cmd.push(function() {
googletag.pubads().addEventListener(‘slotRenderEnded’, function(event) {
var slotId = event.slot.getSlotElementId();
var slotName = event.slot.getAdUnitPath();
adObj[slotName] = slotId;
});
adElem.push(adObj);
});
console.log(“DFP AD units: “);
console.log(adElem);

//For All DFP Name:ID into Global Array Push

//for live video
if(document.getElementById(“containerMain”)) {
var pageType = document.getElementById(“containerMain”).getAttribute(“data-page_type”);
if (pageType == ‘homepage’ && document.getElementById(“livevideopromo”)) {
var options;
var popular_search = [];
function readTextFile(file)
{
var rawFile = new XMLHttpRequest();
rawFile.open(“GET”, file, false);
rawFile.onreadystatechange = function (){
if(rawFile.readyState === 4){
if(rawFile.status === 200 || rawFile.status == 0){
var allText = rawFile.responseText;
options = allText;
}
}
}
rawFile.send(null);
}
var d = new Date();
var hour = d.getHours();
var minute = d.getMinutes();
readTextFile(“/common/live_video.json?v=”+hour+minute);
var options_json = JSON.parse(options);
if (options_json.item.livevideopromo) {
var video_title = options_json.item.livevideopromo.title;
var video_type = options_json.item.livevideopromo.video_type;
var video_url = options_json.item.livevideopromo.video_url;
var video_image = options_json.item.livevideopromo.video_image;
var embed_code = options_json.item.livevideopromo.embed_code;
var video_data = embed_code + “

” + video_title + “

“;
document.getElementById(‘livevideopromo’).innerHTML = video_data;
document.getElementById(‘livevideopromo’).style.display = ‘block’;
// document.getElementById(‘livevideocontent’).style.display = ‘none’;
} else {
document.getElementById(‘livevideopromo’).style.display = ‘none’;
//document.getElementById(‘livevideocontent’).style.display = ‘block’;
}
}
}
//for live video

var breakInt;
var chkadcookie = getUserCookie(‘ad_display_status’);
var sub_id = localStorage.getItem(“engoodreturns_subscription_id”);
if(chkadcookie==null || chkadcookie == undefined || chkadcookie==”){
chkadcookie=””;
}
var chkadcookiemor = localStorage.getItem(‘ad_display_status_mor’);
if(chkadcookiemor==null || chkadcookiemor == undefined || chkadcookiemor==”){
chkadcookiemor=””;
}
var chkadcookieeve = localStorage.getItem(‘ad_display_status_eve’);
if(chkadcookieeve==null || chkadcookieeve == undefined || chkadcookieeve==”){
chkadcookieeve=””;
}
var camp_id = localStorage.getItem(“ad_campiagn”);
if(camp_id==null || camp_id == undefined || camp_id==”){
camp_id = ”;
}
var displayFlag = 0;
var dynamicNotification = {
createAdCookie:function(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = “; expires=”+date.toGMTString();
}
else var expires = “”;
document.cookie = name+”=”+value+expires+”; path=/”;
},
displayNotification:function(body, icon, title, link, duration,slotFlg,currentDay,adCamp){
link = link || 0; // Link is optional
duration = duration || 3000; // Default duration is 5 seconds
icon = icon+’?url=”+link;
var options = {
body: body,
icon: icon
};
navigator.serviceWorker.ready.then(function(registration) {
registration.showNotification(title, options);
if(slotFlg==0){
localStorage.setItem(“ad_display_status_mor’,currentDay);
}else{
localStorage.setItem(‘ad_display_status_eve’,currentDay);
}
localStorage.setItem(‘ad_campiagn’,adCamp);
});
},
displayTime:function(){
var displayHourMor=[8,13];
var displayHourEve =[15,23];
var theDate=new Date();
var currentDay = Math.abs(theDate.getDate());
var currentHour = Math.abs(theDate.getHours());
/*if ((currentHour>=displayHourMor[0] && currentHour<=displayHourMor[1]) && (chkadcookiemor == ” || chkadcookiemor != currentDay)){
clearInterval(breakInt);
dynamicNotification.checkStatus(0,currentDay);
}*/
if ((currentHour>=displayHourEve[0] && currentHour<=displayHourEve[1]) && (chkadcookieeve == ” || chkadcookieeve != currentDay)){
clearInterval(breakInt);
dynamicNotification.checkStatus(1,currentDay);
}
},
trackImpression:function(impUrl){
fetch(impUrl, {
method: “post”,
headers : globalheaders
}).catch(function(err){
console.error(‘Inside Imp error:’, err);
});
},
fetchDynamicAd:function(sub_id,slotFlg,currentDay){
var no_ads = 1;
var device_type=1;
fetch(“/scripts/cms/controller.php?module=subscription&type=getBiddingAd&last_sub_id=”+sub_id+”&device_type=”+device_type+”&noAds=”+no_ads+”&campid=”+camp_id,{
method: “post”,
headers : globalheaders
}).then(function(e) {
e.text().then(function(data){
adgebraResponse = data;
if(adgebraResponse !=” && adgebraResponse !=undefined){
var adgRes = JSON.parse(adgebraResponse);
if(adgRes[0] !=” && adgRes[0] != undefined && adgRes[0] != null){
if(adgRes[0][‘ad_provider’]===’Veve’){
var adgUrl = adgRes[0][‘trackerUrl’];
var impUrl = adgRes[0][‘notificationImp’];
var adgTitle = adgRes[0][‘notificationMessage’];
dynamicNotification.trackImpression(impUrl);
}else{
var adgUrl = decodeURIComponent(adgRes[0][‘trackerUrl’]).replace(/\+/g,’ ‘);
var adgTitle = decodeURIComponent(adgRes[0][‘notificationMessage’]).replace(/\+/g,’ ‘);
}
var adgImg = adgRes[0][‘notificationImage’];
var adCamp = adgRes[0][‘campId’];
dynamicNotification.displayNotification(adgTitle,adgImg,adgTitle,adgUrl,3000,slotFlg,currentDay,adCamp);
}
}
});
})[“catch”](function(e) {
console.log(“Fetch Error :-S”, e)
});
},

checkStatus:function(slotFlg,currentDay){
if(sub_id != “” && sub_id != undefined && sub_id != null){
dynamicNotification.fetchDynamicAd(sub_id,slotFlg,currentDay);
}
},
init : function() {
if (“Notification” in window) {
var permission = Notification.permission;
var userStatus = navigator.onLine;
console.log(permission+” User is :”+userStatus);
if (permission === “denied”) {
return;
} else if (permission === “granted” && userStatus) {
breakInt=setInterval(“dynamicNotification.displayTime()”,10000);
}
}
}
};
var qparam = window.location.search;
//if(qparam.indexOf(‘oiad=1′)>’-1′){
//dynamicNotification.init();
//}

if(no_ad_flag==true){
if(document.getElementById(‘cmscontent-right1’)){
//document.getElementById(‘cmscontent-right1’).style.display = ‘none’;
}
if(document.getElementById(‘cmscontent-article1’)){
// document.getElementById(‘cmscontent-article1’).style.display = ‘none’;
}
if(document.getElementById(‘cmscontent-article2’)){
// document.getElementById(‘cmscontent-article2’).style.display = ‘none’;
}

var elem = document.querySelectorAll(‘.refreshInarticleAd’),
i = 0,
l = elem.length;

for (i; i < l; i++) {
// elem[i].style.display = ‘none’;
}
}

!function(e){var t=function(u,D,f){“use strict”;var k,H;if(function(){var e;var t={lazyClass:”lazy”,loadedClass:”lazyloaded”,loadingClass:”lazyloading”,preloadClass:”lazypreload”,errorClass:”lazyerror”,autosizesClass:”lazyautosizes”,srcAttr:”data-src”,srcsetAttr:”data-srcset”,sizesAttr:”data-sizes”,minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,a=u.HTMLPictureElement,P=”addEventListener”,$=”getAttribute”,q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,l=u.requestIdleCallback,j=/^picture$/i,r=[“load”,”error”,”lazyincluded”,”_lazyloaded”],i={},G=Array.prototype.forEach,J=function(e,t){if(!i[t]){i[t]=new RegExp(“(\\s|^)”+t+”(\\s|$)”)}return i[t].test(e[$](“class”)||””)&&i[t]},K=function(e,t){if(!J(e,t)){e.setAttribute(“class”,(e[$](“class”)||””).trim()+” “+t)}},Q=function(e,t){var i;if(i=J(e,t)){e.setAttribute(“class”,(e[$](“class”)||””).replace(i,” “))}},V=function(t,i,e){var a=e?P:”removeEventListener”;if(e){V(t,i)}r.forEach(function(e){t[a](e,i)})},X=function(e,t,i,a,r){var n=D.createEvent(“Event”);if(!i){i={}}i.instance=k;n.initEvent(t,!a,!r);n.detail=i;e.dispatchEvent(n);return n},Y=function(e,t){var i;if(!a&&(i=u.picturefill||H.pf)){if(t&&t.src&&!e[$](“srcset”)){e.setAttribute(“srcset”,t.src)}i({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,i){i=i||e.offsetWidth;while(i49?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e0;if(r&&Z(a,”overflow”)!=”visible”){i=a.getBoundingClientRect();r=C>i.left&&pi.top-1&&g500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!=”auto”))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,”lazyloaded”)};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$](“data-media”)||e[$](“media”)]){e.setAttribute(“media”,t)}if(i){e.setAttribute(“srcset”,i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,”lazybeforeunveil”,e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute(“sizes”,a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||””)}f=e.firesLoad||”src”in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName(“source”),F)}if(s){t.setAttribute(“srcset”,s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,”ls-is-cached”)}B(u);t._lazyCache=true;I(function(){if(“_lazyCache”in t){delete t._lazyCache}},9)}if(t.loading==”lazy”){N–}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$](“sizes”));var r=a==”auto”;if((r||!m)&&i&&(e[$](“src”)||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,”lazyunveilread”).detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q(“scroll”,l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+” “+H.preloadClass);q(“scroll”,i,true);q(“resize”,i,true);q(“pageshow”,function(e){if(e.persisted){var t=D.querySelectorAll(“.”+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P](“DOMNodeInserted”,i,true);O[P](“DOMAttrModified”,i,true);setInterval(i,999)}q(“hashchange”,i,true);[“focus”,”mouseover”,”click”,”load”,”transitionend”,”animationend”].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q(“load”,o);D[P](“DOMContentLoaded”,i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+=”px”;e.setAttribute(“sizes”,a);if(j.test(t.nodeName||””)){r=t.getElementsByTagName(“source”);for(n=0,s=r.length;n

`;

ulcontent.innerHTML += licontent;

if (document.querySelector(‘.oi-no-noticationwrap’)) {
document.querySelector(‘.oi-no-noticationwrap’).style.display = ‘none’;
}
if (document.querySelector(‘.oi-notification-content’)) {
document.querySelector(‘.oi-notification-content’).style.display = ‘block’;
}
if(document.querySelector(‘.oi-notification-settings’)){
document.querySelector(‘.oi-notification-settings’).style.visibility = ‘hidden’;
}
// Add click event for article links
addClickEventToArticleLinks();
handleShareIconClick();
});
}

// Function to handle when no articles are available
function handleNoArticles() {
if (document.querySelector(‘.oi-no-noticationwrap’)) {
document.querySelector(‘.oi-no-noticationwrap’).style.display = ‘block’;
}
if (document.querySelector(‘.oi-notification-content’)) {
document.querySelector(‘.oi-notification-content’).style.display = ‘none’;
}
if(document.querySelector(‘.oi-notification-settings’)){
document.querySelector(‘.oi-notification-settings’).style.visibility = ‘hidden’;
}
}

// Function to handle click on article links
function addClickEventToArticleLinks() {
document.querySelectorAll(‘.notifyanchor’).forEach(anchor => {
anchor.addEventListener(‘click’, function (e) {
e.preventDefault();
const articleId = this.getAttribute(‘data-article-id’);
let clearedIds = (localStorage.getItem(‘clearedArticleIds’) || ”).split(‘,’).filter(id => id);
if (!clearedIds.includes(articleId)) {
clearedIds.push(articleId);
}
const updatedIds = clearedIds.slice(-30);
localStorage.setItem(‘clearedArticleIds’, updatedIds.join(‘,’));
window.location.href = this.getAttribute(‘href’);
});
});
}

// Function to handle ‘Clear All’ button click
function handleClearAllClick(excludedIds, displayedArticleIds) {
document.querySelector(‘#clearallios’).addEventListener(‘click’, function (e) {
if (document.querySelector(‘.oi-no-noticationwrap’)) {
document.querySelector(‘.oi-no-noticationwrap’).style.display = ‘block’;
}
if (document.querySelector(‘.oi-notification-content’)) {
document.querySelector(‘.oi-notification-content’).style.display = ‘none’;
}
var ulcontent1 = document.getElementById(‘notify-content’) || document.getElementById(‘notification-content’);
ulcontent1.innerHTML = ”;
let updatedIds = excludedIds.concat(displayedArticleIds);
localStorage.setItem(‘clearedArticleIds’, updatedIds.join(‘,’));
});
}

// Function to handle back arrow click
function handleBackArrowClick() {
document.querySelector(‘.oi-notification-backarrow’).addEventListener(‘click’, function (e) {
if (document.querySelector(‘.oi-notification-wrapper’)) {
document.querySelector(‘.oi-notification-wrapper’).classList.remove(‘shownotf’);
}
if (document.querySelector(‘.oi-notification-wrapper’)) {
document.querySelector(‘.oi-notification-wrapper’).classList.remove(‘show-settings’);
}
document.body.classList.remove(‘overflw’);
});
}

// Function to handle share icon click
function handleShareIconClick() {
document.querySelectorAll(‘.oi-notf-share-icon’).forEach(function(element) {
element.addEventListener(‘click’, function (e) {
if (navigator.share !== undefined) {
var share_url = this.getAttribute(‘data-url’);
var share_title = this.getAttribute(‘data-title’);
navShareIOS(share_url, share_title);
}
});
});
}

// Main function to show latest pushed articles
function showLatestPushedArticles() {
setupNotificationWrapper();
const excludedIds = getExcludedIds();
fetchAndRenderArticles(excludedIds);
//handleClearAllClick(excludedIds, displayedArticleIds);
handleBackArrowClick();

}
if (navigator.userAgent.includes(“Macintosh”)) {
const notificationBell = document.getElementById(“notification_bell”);
if (notificationBell && notificationBell.classList.contains(“notification-bell”)) {
notificationBell.classList.replace(“notification-bell”, “notification-bell-ios”);
notificationBell.id = “notification_bell_ios”;
notificationBell.style.display=’block’;
document.getElementById(‘notification_bell_ios’).addEventListener(‘click’, function (e) {
showLatestPushedArticles();
if(document.querySelector(‘.notf-overlay’)){
document.querySelector(‘.notf-overlay’).classList.add(‘shownotf’);
}
});
document.querySelector(‘.notf-overlay’).addEventListener(‘click’, function (e) {
if(document.querySelector(‘.notf-overlay’)){
document.querySelector(‘.notf-overlay’).classList.remove(‘shownotf’);
}
if(document.querySelector(‘.oi-notification-wrapper’)){
document.querySelector(‘.oi-notification-wrapper’).classList.remove(‘shownotf’);
}
});
}
}

if(deviceType==’mobile’){
if (domainmiddle === ‘oneindia’ || domainmiddle === “https://www.goodreturns.in/news/goodreturns” || domainmiddle==’filmibeat’ || domainmiddle==’boldsky’ || domainmiddle==’drivespark’ || domainmiddle==’gizbot’){
var isIphone = /iPhone/i.test(navigator.userAgent);
function appendUTM(href, campaign) {
if(urlUtm){
var stickySource = urlUtm;
}else{
var stickySource=”OI-EN”;
}
if(href) {
href += (href.includes(‘?’) ? ‘&’ : ‘?’) + ‘ref_source=” + urlUtm + “&ref_medium=Sticky-Footer-Promo&ref_campaign=’ + campaign;
return href;
}
return href;
}
let footerVersion = “1.0.30”;
async function loadFooterConfig(domainMiddle) {
try {
if(host1==’www.filmibeat.com’){
var jsonFileName = `/common/${domainMiddle}-sf-temp.json?v=${footerVersion}`;
}else{
var jsonFileName = `/common/${domainMiddle}-sf.json?v=${footerVersion}`;
}
const response = await fetch(jsonFileName);
const config = await response.json();
const currentDomain = window.location.hostname || ‘www.oneindia.com’;
const domainConfig = config[currentDomain];

if (domainConfig) {
createFooterItems(domainConfig);
} else {
console.error(‘No configuration found for domain:’, currentDomain);
}
} catch (error) {
console.error(‘Error loading footer configuration:’, error);
}
}

// Function to find the next static item for correct insertion based on the config
function findNextStaticItem(currentKey, jsonOrder, config, staticKeys) {
let currentIndex = jsonOrder.indexOf(currentKey);
for (let i = currentIndex + 1; i < jsonOrder.length; i++) {
const nextKey = jsonOrder[i];
if (staticKeys.includes(nextKey)) {
return config[nextKey].id;
}
}
return null;
}

function createFooterItems(config) {
const footerUL = document.getElementById(‘footer-items’);
const staticKeys = [‘home’, ‘notifications’, ‘profile’, ‘app’];
const jsonOrder = Object.keys(config);
var fragment = document.createDocumentFragment();

// First, build the items and store them in an array with their correct position.
let itemsArray = [];

jsonOrder.forEach(key => {
if (!staticKeys.includes(key)) {
const item = config[key];
if (item) {
const li = document.createElement(‘li’);
li.id = item.id;

const a = document.createElement(‘a’);
a.href = item.url === “https://www.goodreturns.in/news/javascript:void(0);” ? “https://www.goodreturns.in/news/javascript:void(0);” : item.url;
a.dataset.tracker = item.tracker;

if (item.campaign) {
a.setAttribute(‘data-urlCampaign’, item.campaign);
}
if (item.target) {
a.target = item.target;
}

const iconSpan = document.createElement(‘span’);
iconSpan.className = item.class;
if (item.icon) {
iconSpan.style.backgroundImage = `url(${item.icon})`;
iconSpan.style.backgroundRepeat=”no-repeat”;
if (domainmiddle === ‘filmibeat’) {
iconSpan.style.backgroundSize=”contain”;
}
iconSpan.style.backgroundPosition = ‘0 0′;
iconSpan.style.width = item.width || ’18px’;
}

const labelSpan = document.createElement(‘span’);
labelSpan.className=”flabel”;
labelSpan.textContent = item.label;

a.appendChild(iconSpan);
a.appendChild(labelSpan);

if (item.badge) {
const badgeSpan = document.createElement(‘span’);
badgeSpan.className=”fshorts-new”;
badgeSpan.textContent = item.badge;
a.appendChild(badgeSpan);
}

li.appendChild(a);

// Store each item and its position in the order
const nextStaticItem = findNextStaticItem(key, jsonOrder, config, staticKeys);
itemsArray.push({ li, nextStaticItem });
}
}
});

// Sort the items based on the reference to the next static item
itemsArray.forEach(({ li, nextStaticItem }) => {
if (nextStaticItem) {
const referenceNode = document.getElementById(nextStaticItem);
if (referenceNode) {
referenceNode.insertAdjacentElement(‘beforebegin’, li);
} else {
console.error(`Element with ID ${nextStaticItem} not found.`);
}
} else {
fragment.appendChild(li); // Append to fragment if no static items are ahead
}
});

// Once all elements are processed, append the fragment to the DOM
footerUL.appendChild(fragment);

if (document.getElementById(‘oi-footer-sticky-wrapper’)) {
if(host1==’www.filmibeat.com’){
document.getElementById(‘oi-footer-sticky-wrapper’).classList.add(‘fbenglish’);
}else{
document.getElementById(‘oi-footer-sticky-wrapper’).classList.add(domainmiddle);
}
document.getElementById(‘oi-footer-sticky-wrapper’).style.display = ‘none’;
}

if (document.getElementById(‘bottomAdWrapper’)) {
document.getElementById(‘bottomAdWrapper’).classList.add(‘btmstkwdg’);
}
if(document.querySelector(‘ins[id^=”gpt_unit_/1008496/oi-320x50_0″]’)){
document.querySelector(‘ins[id^=”gpt_unit_/1008496/oi-320x50_0″]’).classList.add(‘btmstkwdg’);
}
handleSpecialCases(config); // Handle dynamic updates for notifications/profile
}

function handleSpecialCases(config) {
console.log(config);
if (config[‘notifications’]) {
if(isIphone){
document.getElementById(‘notiicon’).style.display = ‘none’;
document.getElementById(‘notiiconactive’).style.display = ‘none’;
document.getElementById(‘notiiconactiveios’).style.display = ‘inline-block’;
if(document.querySelector(‘.oi-notification-settings-header’)){
document.querySelector(‘.oi-notification-settings-header’).style.display=’none’;
}
document.getElementById(‘notiiconactiveios’).addEventListener(‘click’, function (e) {
showLatestPushedArticles();
});
}else{
const notfNum = document.getElementById(‘notf-num’) || document.querySelector(‘.notification-num’);
const notiicon = document.getElementById(‘notiicon’);
const notiiconactive = document.getElementById(‘notiiconactive’);

if (notfNum && window.getComputedStyle(notfNum).display === ‘block’) {
notiiconactive.style.display = ‘inline-block’;
notiicon.style.display = ‘none’;
} else {
notiicon.style.display = ‘inline-block’;
notiiconactive.style.display = ‘none’;

if (Notification.permission === ‘default’) {
document.getElementById(‘notitext’).innerText=”Notifications”;

} else {
document.getElementById(‘notitext’).innerText=”Notifications”;
}
}
}
}

if (config[‘profile’]) {
// Dynamic handling of profile icon based on login status
if (userLoggedIn == 0) {
document.getElementById(‘profileicon’).style.display = ‘inline-block’;
document.getElementById(‘profileiconactive’).style.display = ‘none’;
} else {
document.getElementById(‘profileicon’).style.display = ‘none’;
document.getElementById(‘profileiconactive’).style.display = ‘inline-block’;
}
}
if (isIphone && config.app) {
document.getElementById(‘appicon’).style.display = ‘none’;
}
// Handle home icon active state
if (config[‘home’]) {
const homeIconLink = document.querySelector(‘#homeicon a’);
if (trackpagetype !== ‘home’) {
homeIconLink.classList.remove(‘active’);
}
}
if (config[‘budget’]) {
const budgetIconLink = document.querySelector(‘#budgeticon a’);
if (window.location.href.indexOf(‘/union-budget/’)>-1) {
budgetIconLink.classList.add(‘active’);
}
}
document.querySelectorAll(‘.oi-footer-sticky-content ul’).forEach(ul => {
const visibleLiCount = Array.from(ul.querySelectorAll(‘li’)).filter(li => {
return li.offsetParent !== null; // Checks if the element is visible
}).length;
if (visibleLiCount === 4) {
ul.classList.add(‘icons4’);
} else if (visibleLiCount === 3) {
ul.classList.add(‘icons3’);
}
ul.querySelectorAll(‘li a’).forEach(link => {
link.addEventListener(‘click’, function (e) {
if (typeof pingtoserverforSharetracker === ‘function’) {
const shareType=”bottom-sticky”; // or set according to your tracking logic
const shareMedium = link.getAttribute(‘data-tracker’); // use the campaign or a default value
pingtoserverforSharetracker(shareType, shareMedium);
}
});
});
});

document.querySelectorAll(‘[data-urlCampaign]’).forEach(link => {
var href = link.getAttribute(‘href’);
var campaign = link.getAttribute(‘data-urlCampaign’);
var newHref = appendUTM(href, campaign);
link.setAttribute(‘href’, newHref);
});
if (config[‘search’]) {
// Dynamic handling of profile icon based on login status
if(document.querySelector(‘#searchicon’)){
document.querySelector(‘#searchicon’).addEventListener(‘click’, function (event) {
if (typeof loadFooterStickySearch === ‘function’) {
loadFooterStickySearch();
}
});
}
}
}
//if (!(isIphone && domainmiddle === ‘boldsky’)) {
var btmstickywidget=0;
if (‘requestIdleCallback’ in window) {
requestIdleCallback(() => {
window.addEventListener(“scroll”, function () {
if (btmstickywidget == 0) {
btmstickywidget = 1;
loadFooterConfig(domainmiddle);
}
});
});
} else {
// Fallback for browsers that don’t support requestIdleCallback
window.addEventListener(“scroll”, function () {
if (btmstickywidget == 0) {
btmstickywidget = 1;
loadFooterConfig(domainmiddle);
}
});
}
//}
}
}
/*let lastScrollTop = 0;
let ticking = false;

if (/Mobi|Android/i.test(navigator.userAgent)) {
document.body.setAttribute(“id”, “maincontainer”);

const bodycontainer = document.getElementById(“maincontainer”);

if (bodycontainer) {
window.addEventListener(“scroll”, function () {
if (!ticking) {
window.requestAnimationFrame(function () {
let scrollTop = window.scrollY || document.documentElement.scrollTop;

if (scrollTop > lastScrollTop) {
bodycontainer.classList.add(“scrolldown”);
bodycontainer.classList.remove(“scrollup”);
} else {
bodycontainer.classList.remove(“scrolldown”);
bodycontainer.classList.add(“scrollup”);
}

lastScrollTop = Math.max(scrollTop, 0);

if (scrollTop === 0) {
bodycontainer.classList.remove(“scrollup”);
}

ticking = false;
});

ticking = true;
}
});
}
}*/

`
element.innerHTML = deepLinkHtml;
});
if(!(/Mobi|Android/i.test(navigator.userAgent))){
let relatedtitle = document.createElement(“style”);
relatedtitle.innerText = `
.gd-article-relatedtitle {margin-left: 110px;font-size:18px;line-height:28px;padding:0 32px;color: var(–color-white);}
`;
document?.body.appendChild(relatedtitle);
if([“www.goodreturns.in”].includes(window.location.hostname)){
let relatedtitle = document.createElement(“style”);
relatedtitle.innerText = `
.gd-article-relatedtitle {margin-left: 110px;font-size:18px;line-height:28px;padding:0 32px;color: var(–primary-color);}
`;
document?.body.appendChild(relatedtitle);
}
}
let corouselElement = document.querySelectorAll(`.gd-trending-links-wrapper`)

corouselElement.forEach(item=>{
let corouselArticles = Array.isArray(data) ? data.filter(item=>!showedArticles.includes(item.content_id)).slice(0,3) : [];
let corouselHtml = `

Trending in GoodReturns

`
item.innerHTML = corouselHtml;
corouselHtml=””;

})
if([“www.goodreturns.in”].includes(window.location.hostname)){
let relatedtitle = document.createElement(“style”);
relatedtitle.innerText = `
.gd-trending-links-wrapper {background: var(–primary-bg);padding: 15px;margin: 40px 0;}
.gd-trending-links-heading {font-weight: bold;font-size: 16px;color: var(–primary-color);line-height: 21px;margin-bottom: 12px;position: relative;padding: 0 0 0 15px;}
.gd-trending-links-title {margin-left: 106px;font-size: 14px;line-height: 24px;color: var(–primary-color);font-weight: normal;}
.gd-trending-links-title a {color: var(–primary-color);}
`;
document?.body.appendChild(relatedtitle);
}
}
getRefContentSuffix(el) {
const uparam = el.getAttribute(“data-uparam”);
if (!uparam) return null;

const params = new URLSearchParams(uparam);
const refContent = params.get(“ref_content”);
if (!refContent) return null;

// Matches:
// “1481014-p1” → p1
// “p2” → p2
const match = refContent.match(/(?:^|-)p(\d+)$/);

return match ? `p${match[1]}` : null;
}
loadAd(container, options, src) {
if (!container) return;

container.style.display = “block”; // important
const opt = document.createElement(“script”);
opt.type = “text/javascript”;
opt.textContent = `
window.atOptions = ${JSON.stringify(options)};
`;
container.appendChild(opt);
const js = document.createElement(“script”);
js.type = “text/javascript”;
js.src = src;
js.async = false; // force execution order
container.appendChild(js);
}

}
var commonFunctions = new CommonFunctions();
if([‘nagaland lottery’,’kerala lottery’,’lottery results’].includes(document.head.dataset.category_name) && document.head.dataset.monetization == “false”){
fillEmptySlotsWithArticles = 0;
bottomStickyAdEnable = 0;
}

‘;
} else {
banner_frame.innerHTML =
”;
}
// document.getElementById(‘are-slot-2’).insertAdjacentHTML(“afterend”, banner_frame);
document.getElementById(“are-slot-2”).parentNode.insertBefore(banner_frame, document.getElementById(“are-slot-2”).nextSibling);
placedElem.classList.add(“conreadload”);
placedElem.setAttribute(“style”, “max-height: ” + (elDistanceToTopval + extraHeight) + “px;overflow: hidden;position: relative;min-height:1000px !important”);
var el = document.querySelector(“.morearticle”); // this element contains more than 1 DOMs.
el.onclick = function () {
placedElem.setAttribute(“style”, “max-height:100%;overflow: hidden;position: relative;”);
placedElem.classList.remove(“conreadload”);
placedElem.classList.add(“conreadhgt”);
document.querySelector(“.morearticle”).style.display = “none”;
document.querySelector(“.expand-btn-wrap”).style.display = “none”;
};
}
}
let readmoreflag1 = false;
let anchorData = false;
let deepLinksLoaded = false;
let module_name = document?.head?.dataset?.module_name;
let lotteryPageAdLoaded = false;
let indianSutrasAds = false;
if ([“politicians”, “power-cut”].includes(module_name)) {
readmoreflag1 = true;
}
if (document?.head?.dataset?.monetization == ‘false’) {
readmoreflag1 = true;
}
window.addEventListener(“load”,function(){
if(domainmiddle == “https://www.goodreturns.in/news/goodreturns” && trackpagetype == “database” && /Mobi|Android/i.test(navigator.userAgent)){
if([…document.querySelectorAll(“.gd-article-related-wrapper”)][0]){
let pgdElement = document.getElementById(“are-slot-pgd-1”);
if(pgdElement){
pgdElement.style.display = “none”;
}
// pgdElement.id = “are-slot-pgd-1”;
// pgdElement.style = “width: 100%; height: 100px; padding: 5px;text-align:center;”
// oiinsertBeforeWc(document.querySelectorAll(“.gd-article-related-wrapper”)[0], pgdElement);
/* let googletagScript = document.createElement(“script”);
googletagScript.text = `
googletag.cmd.push(function() {

let adxSlot = googletag.defineSlot(‘/1008496/adx-gr-mobi-sticky’, [[320, 50], [320, 100]], ‘are-slot-pgd-1’).addService(googletag.pubads());
googletag.pubads().enableSingleRequest();

googletag.enableServices();
googletag.pubads().refresh([adxSlot]);
});
`;
pgdElement.appendChild(googletagScript); */
}
}
})
window.addEventListener(“scroll”, function () {
if (!readmoreflag1) {
readmoreflag1 = true;
if (/Mobi|Android/i.test(navigator.userAgent)) {
if (trackpagetype == “database” || trackpagetype == “photos” || trackpagetype == “wallpapers”) {
if (document.getElementById(“are-slot-2”)) {
let placedElem = document.getElementById(“container”);
let extraHeight = 500;

if (domainmiddle == “https://www.goodreturns.in/news/goodreturns”) {
extraHeight = 470;
}
if (domainmiddle == “filmibeat” || domainmiddle == “drivespark”) {
placedElem = document.querySelector(“.oi-container”);
}
if (trackpagetype == “database”) {
if (domainmiddle == “drivespark”) {
placedElem = document.querySelector(“.oi-container”);
}
}
if (trackpagetype == “photos”) {
if ([“kannada.goodreturns.in”, “www.nativeplanet.com”, “tamil.goodreturns.in”, “www.mykhel.com”, “www.gizbot.com”].includes(window.location.hostname)) {
placedElem = document.querySelector(“.oi-container”);
}
}
if ([“www.boldsky.com”, “kannada.boldsky.com”].includes(window.location.hostname)) {
placedElem = document.querySelector(“.oi-container”);
extraHeight = 450;
}
if (domainmiddle == “mykhel”) {
placedElem = document.querySelector(“.oi-container”);
extraHeight = 500;
}
if (domainmiddle == “oneindia”) {
placedElem = document.querySelector(“.oi-container”);
extraHeight = 490;
if (“database” == trackpagetype) {
extraHeight = 350;
}
}
if (placedElem) {
let elDistanceToTopDBpage = parseInt(window.pageYOffset + document.getElementById(“are-slot-2”).getBoundingClientRect().top);
if(domainmiddle == “https://www.goodreturns.in/news/goodreturns” && trackpagetype == “database”){
let pageTags = document.head.dataset.engTags
fetch(`https://dmp.oneindia.com/api/dmp?tags=${pageTags}&dmp_limit=50&trending_limit=50&site=${window.location.hostname}&q=kjwd`)
.then(res=>res.json())
.then(data=>{
let mixedArr = data.dmp.length > numOfDeeplinks ? data.dmp : […data.dmp, …(data.trending.slice(0, (numOfDeeplinks – data.dmp.length)))];
commonFunctions.createDeepLinks(“gd-article-related-wrapper”,”class”, mixedArr);
let allDeplinkHeight = 0
const stopEl = document.getElementById(“are-slot-2”);
document.querySelectorAll(“.gd-article-related-wrapper”).forEach(element => {
if (stopEl && (element.compareDocumentPosition(stopEl) & Node.DOCUMENT_POSITION_FOLLOWING)) {
allDeplinkHeight += element.offsetHeight || element.clientHeight || 0;
}
});
commonReadmorefunDBPages(elDistanceToTopDBpage, placedElem, extraHeight + parseInt(allDeplinkHeight));
})
.catch(err=>{
console.log(“deeplink loading…”, err)
commonReadmorefunDBPages(elDistanceToTopDBpage, placedElem, extraHeight);
})
}else{
commonReadmorefunDBPages(elDistanceToTopDBpage, placedElem, extraHeight);
}
}
}
}
} else {
if (domainmiddle == “https://www.goodreturns.in/news/goodreturns” && trackpagetype == “database”) {
let pageTags = document.head.dataset.engTags
fetch(`https://dmp.oneindia.com/api/dmp?tags=${pageTags}&dmp_limit=50&trending_limit=50&site=${window.location.hostname}&q=kjwd`)
.then(res => res.json())
.then(data => {
let mixedArr = data.dmp.length > numOfDeeplinks ? data.dmp : […data.dmp, …(data.trending.slice(0, (numOfDeeplinks – data.dmp.length)))]
commonFunctions.createDeepLinks(“gd-article-related-wrapper”,”class”, mixedArr);
let allDeplinkHeight = 0
document.querySelectorAll(“.gd-article-related-wrapper”).forEach(element => {
allDeplinkHeight += element.offsetHeight || element.clientHeight || 0;
})
})
.catch(err => {
console.log(“deeplink loading…”, err)
});
}
}
}

/* anchor tag tracker */
if (!anchorData) {
anchorData = true;
if (domainmiddle == “https://www.goodreturns.in/news/goodreturns”) {
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const top = Math.round(entry.target.getBoundingClientRect().top + window.scrollY);
let uparam = commonFunctions.getRefContentSuffix(entry.target);
if([…entry.target.classList].includes(“carousel-deeplinks”)){
uparam = “p4”
}
if (typeof analytics === “object”) {
if(uparam){
analytics.track(“hyperlinks”, {
trackpagetype,
“tracker”: {
[uparam]: top
}
});
}
}
observer.unobserve(entry.target);
}
});
}, { threshold: 0.25 });
setTimeout(()=>{
document.querySelectorAll(“.deeplink”).forEach(a => {
observer.observe(a);
});
/* Observe carousel container (not its links) */
document.querySelectorAll(“.carousel-deeplinks”).forEach(a=>{
observer.observe(a);
})
},2000)
}
}
/* anchor tag tracker */

if(!lotteryPageAdLoaded){
lotteryPageAdLoaded = true;
if([‘nagaland lottery’,’kerala lottery’,’lottery results’].includes(document.head.dataset.category_name) && document.head.dataset.monetization == “false”){
if(domainmiddle == “https://www.goodreturns.in/news/goodreturns”){
commonFunctions.loadAd(
document.getElementById(“bottom-sticky”),
atOptions = {
‘key’: ‘ecf07c14b507ef20f5bc289adb3b36bd’,
‘format’: ‘iframe’,
‘height’: 50,
‘width’: 320,
‘params’: {}
},
‘https://engineerfoal.com/ecf07c14b507ef20f5bc289adb3b36bd/invoke.js’
);
if(document.getElementById(“stickymaincon”)){document.getElementById(“stickymaincon”).style.display = “block”;}
if(document.getElementById(“bottomAdWrapper”)){document.getElementById(“bottomAdWrapper”).style.setProperty(“display”,”block”,”important”);}

commonFunctions.loadAd(
document.getElementById(“are-slot-1”),
atOptions = {
‘key’: ‘5f45a40e971323b65893db3d0e63a14f’,
‘format’: ‘iframe’,
‘height’: 250,
‘width’: 300,
‘params’: {}
},
‘https://engineerfoal.com/5f45a40e971323b65893db3d0e63a14f/invoke.js’
);
}
if(domainmiddle == “oneindia”){
commonFunctions.loadAd(
document.getElementById(“bottom-sticky”),
atOptions = {
‘key’ : ‘89758f0f4693df9548968afdb5a4d902’,
‘format’ : ‘iframe’,
‘height’ : 50,
‘width’ : 320,
‘params’ : {}
},
‘https://engineerfoal.com/89758f0f4693df9548968afdb5a4d902/invoke.js’
);
if(document.getElementById(“stickymaincon”)){document.getElementById(“stickymaincon”).style.display = “block”;}
if(document.getElementById(“bottomAdWrapper”)){document.getElementById(“bottomAdWrapper”).style.setProperty(“display”,”block”,”important”);}

commonFunctions.loadAd(
document.getElementById(“are-slot-1”),
atOptions = {
‘key’: ‘ce146180f15d99aff15253386c46ae5a’,
‘format’: ‘iframe’,
‘height’: 250,
‘width’: 300,
‘params’: {}
},
‘https://engineerfoal.com/ce146180f15d99aff15253386c46ae5a/invoke.js’
);
}
}
}

if(!indianSutrasAds){
let adSlots = document.querySelectorAll(“[id^=’are-slot-‘]”);
indianSutrasAds = true;
if(adSlots.length){
adSlots.forEach(element=>{
if(window.location.hostname == “hindi.indiansutras.com”){
let nativeDiv = document.createElement(“div”);
nativeDiv.id = “4dcfbc057e2ae8589f9bbd98b591c50a”;

const js = document.createElement(“script”);
js.type = “text/javascript”;
js.src = “https://click.nativclick.com/loading/?handle=9699”;
js.async = false; // force execution order
nativeDiv.appendChild(js);
element.appendChild(nativeDiv)
}
if(window.location.hostname == “tamil.indiansutras.com”){
let nativeDiv = document.createElement(“div”);
nativeDiv.id = “fc2dc7d20994a777cfd5e6de734fe254”;

const js = document.createElement(“script”);
js.type = “text/javascript”;
js.src = “https://click.nativclick.com/loading/?handle=9698”;
js.async = false; // force execution order
nativeDiv.appendChild(js);
element.appendChild(nativeDiv)
}
});
}
}

});

if (window.location.hostname === “www.oneindia.com”) {
if (document.getElementById(“shiPromo”)) {
function trackImpHealth(impUrl) {
fetch(impUrl, {
method: “GET”,
mode: “no-cors”,
}).catch(function (err) {
console.log(“Inside Imp error:”, err);
});
}
document.getElementById(“shiPromo”).addEventListener(“click”, function (event) {
event.preventDefault(); // Prevent default navigation
let url = this.href;
if (document.getElementById(“dynamicanchor”)) {
document.getElementById(“dynamicanchor”).remove();
}
var link = document.createElement(“a”);
link.target = “_blank”;
link.id = “dynamicanchor”;
link.href = url;
document.body.appendChild(link);
document.getElementById(“dynamicanchor”).click();
let healthImpUrl = “https://pubads.g.doubleclick.net/gampad/clk?id=6924557502&iu=/1008496/clicktracker-oi-1”;
trackImpHealth(healthImpUrl);
});
}

function checkConsentAndTriggerClarity() {
window.googlefc = window.googlefc || {};
window.googlefc.callbackQueue = window.googlefc.callbackQueue || [];
window.googlefc.callbackQueue.push({
CONSENT_DATA_READY: () =>
__tcfapi(“addEventListener”, 2, (tcData, success) => {
if (success) {
const hasConsent = tcData.purpose.consents && tcData.purpose.consents[1];
if (hasConsent) {
console.log(“Consent granted for tracking”);
window.clarity(“consent”);
} else {
console.log(“Consent not granted for tracking”);
}
} else {
console.log(“Unable to retrieve consent status or TC Data is invalid”);
}
}),
});
}
}

/*—————————————Chartbeat Code Starts——————————————————–*/
if ([“filmibeat”,”https://www.goodreturns.in/news/goodreturns”,”oneindia”].includes(domainmiddle)) {
chartbeatflag = 0;
}
if (chartbeatflag == 1) {
if (typeof ga_author_name === “undefined”) {
var ga_author_name = “”;
}
if (typeof oi_category_name === “undefined”) {
var oi_category_name = “”;
}
var parts = window.location.hostname.split(“.”);
var charbeatdomain = window.location.hostname; //parts.slice(-2).join(‘.’);
(function () {
var _sf_async_config = (window._sf_async_config = window._sf_async_config || {});
_sf_async_config.uid = 51426;
_sf_async_config.domain = charbeatdomain;
_sf_async_config.flickerControl = false;
_sf_async_config.useCanonical = true;
_sf_async_config.useCanonicalDomain = true;
_sf_async_config.sections = oi_category_name;
_sf_async_config.authors = ga_author_name;

function loadChartbeat() {
var e = document.createElement(“script”);
var n = document.getElementsByTagName(“script”)[0];
e.type = “text/javascript”;
e.async = true;
e.src = “https://static.chartbeat.com/js/chartbeat.js”;
n.parentNode.insertBefore(e, n);

var script = document.createElement(“script”);
script.src = “//static.chartbeat.com/js/chartbeat_mab.js”;
script.async = true;
document.head.appendChild(script);

window.removeEventListener(“scroll”, onScroll);
}

function onScroll() {
loadChartbeat();
}
window.addEventListener(“scroll”, onScroll);
})();
}
/*—————————————Chartbeat Code Ends——————————————————–*/
/*—————————————Refinary Code Starts——————————————————–*/
var refineryObj = {
boldsky: “https://tags.refinery89.com/boldskycom.js”,
careerindia: “https://tags.refinery89.com/careerindiacom-aniview.js”,
mykhel: “https://tags.refinery89.com/mykhelcom-aniview.js”,
nativeplanet: “https://tags.refinery89.com/nativeplanetcom-aniview.js”,
};
var refineryHost = [“boldsky”, “careerindia”, “nativeplanet”];
var refineryflag = 0;
if (refineryHost.includes(domainmiddle)) {
function loadrefinery() {
var refinery = document.createElement(“script”);
document.head.appendChild(refinery);
refinery.async = true;
refinery.src = refineryObj[domainmiddle];
sessionStorage.setItem(“refinery_status”, 1);
}

if (refiner_live) {
window.addEventListener(“scroll”, function () {
if (refineryflag == 0) {
refineryflag = 1;
loadrefinery();
}
});
}
}
/*—————————————Refinary Code Ends——————————————————–*/
/*—————————————Momagic Code Starts——————————————————–*/

var moMagicHost = [“oneindia”, “drivespark”, “mykhel”, “filmibeat”, “https://www.goodreturns.in/news/goodreturns”];
function trackMoMagic(evnAct, evnLbl) {
var curTimeStamp = Math.round(new Date().getTime() / 1000);
var extraparam = “&timestamp=” + curTimeStamp;
if (/Mobi|Android/i.test(navigator.userAgent)) {
var triggerDevice = “mobile”; //mobile/desktop
} else {
var triggerDevice = “desktop”; //mobile/desktop
}
var img = document.createElement(“img”);
img.src = “https://” + finalImagePath + “/images/tracker.jpg?tracker=oi-tracker-cms&device=” + triggerDevice + “&type=momagictracker&eventcategory=momagic&eventaction=” + evnAct + “&eventlebel=” + evnLbl + extraparam;
img.setAttribute(“id”, “trackermomagicimage”);
img.setAttribute(“alt”, “Momagic Tracker”);
img.setAttribute(“width”, 1);
img.setAttribute(“height”, 1);
img.style.display = “none”;
document.body.appendChild(img);
}
var trackerGA = “G-BGSPW5MRBP”;
trueReachLoad = false;
var backRef = documentRef;
if (domainmiddle === “oneindia” || domainmiddle === “mykhel” || domainmiddle === “filmibeat” || domainmiddle === “drivespark” || domainmiddle === “https://www.goodreturns.in/news/goodreturns”) {
history.pushState({ page: “intermediate” }, “”, “”);
window.addEventListener(“popstate”, function (event) {
if (location.hash === “” && trueReachLoad) {
if (typeof showTruereachAd === “function”) {
if (backRef && backRef != “”) {
showTruereachAd(backRef);
} else {
showTruereachAd();
}
var evtLbl = “en-oi”;
if (langParam != “” && langParam != undefined && langParam != null) {
var dynsrc = langParam + “-” + hostParam;
evtLbl = dynsrc.toLowerCase();
}
trackMoMagic(“back-button”, evtLbl);
}
}
});
}
if (moMagicHost.includes(domainmiddle)) {
if (promoArticle == 0) {
var evtLbl = “en-oi”;
if (langParam != “” && langParam != undefined && langParam != null) {
var dynsrc = langParam + “-” + hostParam;
evtLbl = dynsrc.toLowerCase();
}

if (/Mobi|Android/i.test(navigator.userAgent)) {
if (momagicFlag === 1) {
if (document.referrer.indexOf(“oneindia.com”) !== -1 || document.referrer.indexOf(“filmibeat.com”) !== -1 || document.referrer.indexOf(“drivespark.com”) !== -1 || document.referrer.indexOf(“mykhel.com”) !== -1 || document.referrer.indexOf(“goodreturns.in”) !== -1) {
trackMoMagic(“referral”, evtLbl);
} else {
var moMagicSession = sessionStorage.getItem(“moMagicSession”);
if (moMagicSession) {
trackMoMagic(“referral”, evtLbl);
} else {
sessionStorage.setItem(“moMagicSession”, 1);
}
}
}
}
}
}

/*—————————————Momagic Code Ends——————————————————–*/
/*—————————————Affinity Matrix/Space Code Starts——————————————————–*/
function affinityMatrix() {
var curhost = location.hostname;
var curdom = curhost.split(“.”).slice(-2).join(“.”);
var o = “script”,
s = top.document,
a = s.createElement(o),
m = s.getElementsByTagName(o)[0],
d = new Date(),
timestamp = “” + d.getDate() + d.getMonth() + d.getHours();
a.async = 1;
a.src = “https://cdn4-hbs.affinitymatrix.com/hvrcnf/” + curdom + “https://www.goodreturns.in/” + timestamp + “/index?t=” + timestamp;
m?.parentNode?.insertBefore(a, m);
}
if (“https://www.goodreturns.in/news/goodreturns” == domainmiddle) {
if (/Mobi|Android/i.test(navigator.userAgent)){
affMatrix = 1;
}
}
if(domainmiddle == “gizbot”){
affMatrix = 1;
}
if (affMatrix == 1) {
if (/Mobi|Android/i.test(navigator.userAgent)) {
if (trackpagetype != “home”) {
var affinityInserted = false;
window.addEventListener(“scroll”, function () {
if (!affinityInserted) {
affinityMatrix();
affinityInserted = true;
}
});
}
}else {
if (trackpagetype != “home”) {
var affinityInserted = false;
window.addEventListener(“scroll”, function () {
if (!affinityInserted) {
affinityMatrix();
affinityInserted = true;
}
});
}
}
}
/*—————————————Affinity Matrix/Space Code Ends——————————————————–*/
/*—————————————Vidverto /Reward Video Code Starts——————————————————–*/
function loadVidvertoScript(elementId, mountId) {
if (vidvertoFlag == 1) {
window.addEventListener(“scroll”, function loadScriptOnScroll() {
var script = document.getElementById(elementId);
if (!script) {
var a = document.createElement(“script”);
a.id = elementId;
a.src = “https://ad.vidverto.io/vidverto/js/aries/v1/invocation.js”;
a.setAttribute(“fetchpriority”, “high”);
var r = window.top;
document.head.appendChild(a);
if (window.self !== window.top) {
window.frameElement.style.cssText = “width:0px!important;height:0px!important;”;
}
r.aries = r.aries || {};
r.aries.v1 = r.aries.v1 || { commands: [] };
var c = r.aries.v1;
c.commands.push(function () {
var d = document.getElementById(elementId);
d.setAttribute(“id”, d.getAttribute(“id”) + new Date().getTime());
var t = window.frameElement || d;
c.mount(mountId, t, { width: 1, height: 1 });
});
window.removeEventListener(“scroll”, loadScriptOnScroll);
}
});
}
}

/*if (domainmiddle === ‘gizbot’) {
loadVidvertoScript(‘_vidverto-6d7f83b216033802179a1489c7ef0112’, ‘12320’);
*/
/*—————————————Vidverto/Reward Video Code Ends——————————————————–*/

/*—————————————Aniview Code Starts——————————————————–*/

/*if(document.querySelector(‘#are-slot-3’)){
document.querySelector(‘#are-slot-3’).classList.remove(‘oiad’, ‘oi-axt’, ‘oiadv’, ‘dynamic-slot’);
}*/
/*—————————————Aniview Code Ends——————————————————–*/

/*—————————————Clarity Code Ends——————————————————–*/
// Assuming domainmiddle and langParam are dynamically determined
if (!domainmiddle || !langParam || domainmiddle.trim() === “” || langParam.trim() === “”) {
console.error(“Error: domainmiddle or langParam is undefined, null, or blank. Script will not execute.”);
} else {
var claritylangParam = langParam.toLowerCase();
let clarityFlag = 0;
let clarityVersion = “1.0.3”;
// Check if Clarity has already been triggered in this session
if (!sessionStorage.getItem(“clarityLoaded”)) {
if ([“oneindia”,”filmibeat”,”https://www.goodreturns.in/news/goodreturns”].includes(domainmiddle)) {
clarityFlag = 1;
}
window.addEventListener(“scroll”, function () {
if (clarityFlag === 0) {
clarityFlag = 1;
fetch(“/common/clarity-tracking.json?v=” + clarityVersion)
.then((response) => response.json())
.then((data) => {
const clarityId = data[domainmiddle]?.[claritylangParam];
if (!clarityId) {
console.error(“Clarity ID not found for the given domain and language!”);
return;
}

(function (c, l, a, r, i, t, y) {
c[a] =
c[a] ||
function () {
(c[a].q = c[a].q || []).push(arguments);
};
t = l.createElement(r);
t.async = 1;
t.src = “https://www.clarity.ms/tag/” + i;
y = l.getElementsByTagName(r)[0];
y.parentNode.insertBefore(t, y);
})(window, document, “clarity”, “script”, clarityId);
if (window.location.hostname === “www.oneindia.com”) {
if (window.googletag && googletag.apiReady) {
checkConsentAndTriggerClarity();
}
}

// Mark Clarity as loaded in this session
sessionStorage.setItem(“clarityLoaded”, “true”);
})
.catch((error) => {
console.error(“Error loading the clarify-tracking.json file:”, error);
});
}
});
}
}
/*—————————————Clarity Code Ends——————————————————–*/

/*—————————————VOX/Adsense Backfil Code Starts——————————————————–*/
if (domainmiddle == “mykhel”) {
if (document.querySelector(“.oi-footer-bottom-ad-close”)) {
document.querySelector(“.oi-footer-bottom-ad-close”).style.display = “none”;
}
}
var adsenseObj = { oneindia: 6500213837, boldsky: 5451350884, gizbot: 8951063454, drivespark: 2314299074, filmibeat: 5203390138, goodreturns: 3315593397, careerindia: 2385655101, mykhel: 2194083414, nativeplanet: 7446410097 };
var adsenseSlot = adsenseObj[domainmiddle];
var inImageCssWeb =
“”;
var inImageCssMobi =
“”;
var inImageHtmlWeb =
‘;
var inImageHtmlMobi =
‘;
var finalHtmlCss = “”;

if (/Mobi|Android/i.test(navigator.userAgent)) {
finalHtmlCss = inImageCssMobi + inImageHtmlMobi;
} else {
finalHtmlCss = inImageCssWeb + inImageHtmlWeb;
}
function loadAdgInImgAd() {
var adginimgdiv = document.createElement(“div”);
adginimgdiv.id = “adgebraInImgAd”;
adginimgdiv.style.minWidth = “600px”;
adginimgdiv.style.minHeight = “90px”;
adginimgdiv.style.position = “absolute”;
adginimgdiv.style.bottom = “0”;
var inImgPlacment = document.querySelector(“.big_center_img”) || document.querySelector(“.big-center-img”);

if (inImgPlacment) {
inImgPlacment.appendChild(adginimgdiv);
}
// Define and display the fallback ad in the new element
googletag.cmd.push(function () {
var adgslot = googletag.defineSlot(“/1008496/popup-thats-cricket-out-of-page”, [1, 1], “adgebraInImgAd”).addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.pubads().enableAsyncRendering();
googletag.enableServices();
googletag.display(“adgebraInImgAd”);
googletag.pubads().refresh([adgslot]);
});
}
function loadAdgInImgAdMobi() {
var adginimgdiv = document.createElement(“div”);
adginimgdiv.id = “adgebraInImgAd”;
adginimgdiv.style.minWidth = “320px”;
adginimgdiv.style.minHeight = “50px”;
adginimgdiv.style.position = “absolute”;
adginimgdiv.style.bottom = “0”;
var inImgPlacment = document.querySelector(“.big-center-img”) || document.querySelector(“.big_center_img”);

if (inImgPlacment) {
inImgPlacment.appendChild(adginimgdiv);
}
// Define and display the fallback ad in the new element
googletag.cmd.push(function () {
var adgslot = googletag.defineSlot(“/1008496/popup-thats-cricket-out-of-page”, [1, 1], “adgebraInImgAd”).addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.pubads().enableAsyncRendering();
googletag.enableServices();
googletag.display(“adgebraInImgAd”);
googletag.pubads().refresh([adgslot]);
});
}
var backfillWidgets = {
voxWidget: function (idx, elem) {
if (liteflag == 0) {
if (document.getElementById(“oi-vox”)) {
var sspflag = 0;
if (sspflag == 0) {
if (typeof window._tx === “undefined”) {
var s = document.createElement(“script”);
s.type = “text/javascript”;
s.async = true;
s.src = “https://st.hbrd.io/ssp.js?t=” + new Date().getTime();
(document.getElementsByTagName(“head”)[0] || document.getElementsByTagName(“body”)[0]).appendChild(s);
}
window._tx = window._tx || {};
window._tx.cmds = window._tx.cmds || [];
window._tx.cmds.push(function () {
window._tx.init({
onSuccessInImageLoad: function (data) {
console.log(“onSuccessInImageLoad”, data);
},
onFailInImageLoad: function (data) {
if (backfillorder == 2) {
backfillWidgets.adsenseWidget(finalHtmlCss, 2, idx, elem);
/*if (domainmiddle === ‘oneindia’) {
if (/Mobi|Android/i.test(navigator.userAgent)) {
backfillWidgets.adsenseWidget(finalHtmlCss,2,idx,elem);
}else{
loadAdgInImgAd();

}
}*/
}
// console.log(“onFailInImageLoad”, data);
},
});
});
}
/* window.addEventListener(
“scroll”,
function () {
},
false
); */
}
}
},
adsenseWidget: function (dynamicHtmlCSs, flg, idx, elem) {
var scriptElement = document.createElement(“script”);
scriptElement.src = “https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6601380052549923”;
scriptElement.async = true;
scriptElement.crossOrigin = “anonymous”;
document.head.appendChild(scriptElement);
var adsenseDiv = document.createElement(“div”);
adsenseDiv.id = “oiInImg”;
adsenseDiv.classList.add(“oiInImg”);
adsenseDiv.innerHTML = dynamicHtmlCSs;
elem.insertAdjacentElement(“afterend”, adsenseDiv);

var adsenseInt = setInterval(function () {
var oiInImgElems = document.querySelectorAll(“.oiInImg”);
if (oiInImgElems.length > 0) {
var oiInImgWrapperElems = document.querySelectorAll(“.oiInImg ins”);
oiInImgWrapperElems.forEach(function (wrapperElem) {
var filledStatus = wrapperElem.getAttribute(“data-ad-status”);
if (filledStatus === “filled”) {
oiInImgElems.forEach(function (imgElem) {
imgElem.style.display = “block”;
});
var imgCloseBtnElem = document.querySelector(“#img-close-btn”);
imgCloseBtnElem.style.opacity = “1”;
imgCloseBtnElem.addEventListener(“click”, function () {
oiInImgElems.forEach(function (imgElem) {
imgElem.innerHTML = “”;
});
});
var imgCloseBtns = document.querySelectorAll(“.img-close-btn”);
imgCloseBtns.forEach(function (imgCloseBtn) {
imgCloseBtn.style.opacity = “1”;
imgCloseBtn.addEventListener(“click”, function () {
oiInImgElems.forEach(function (imgElem) {
imgElem.innerHTML = “”;
});
});
});
clearInterval(adsenseInt);
} else if (filledStatus === “unfilled”) {
oiInImgElems.forEach(function (imgElem) {
imgElem.style.display = “none”;
});
if (backfillorder == 1 && flg == 1) {
backfillWidgets.voxWidget(idx, elem);
}
clearInterval(adsenseInt);
}
});
}
}, 500);
},
};
if (host.indexOf(“bengali”) > -1) {
backfillorder = 2;
}
var voxloadflag = 0;
var voxFlag = 1;
var sspflagload = 0;
var gccflag = 0;
var gccflagin = 0;
window.addEventListener(“scroll”, function () {
if (sspflagload == 0) {
sspflagload = 1;
var con_code = “”;
var city_code = “”;
var gcccountryCodes = [“BH”, “KW”, “OM”, “QA”, “SA”, “AE”];
var gcccountryCodesInd = [“IN”];
var countryInt;
countryInt = setInterval(function () {
if (document.body) {
var gapiDetails = localStorage.getItem(“userlocation”);
if (gapiDetails) {
clearInterval(countryInt);
var tmpgapijson = JSON.stringify(gapiDetails);
var jdata = gapiDetails;
jdata = JSON.parse(jdata);
con_code = jdata.country_code;
city_code = jdata.city;
if (gcccountryCodes.includes(con_code)) {
//if(city_code==’Bhubaneswar’){
gccflag = 112345;
//}
}
if (!gcccountryCodesInd.includes(con_code)) {
gccflagin = 1;
backfillorder = 1;
}
if (document.querySelector(“.image_listical”)) {
var imageelem = document.querySelectorAll(“.image_listical”);
var imglen = imageelem.length;
if (imglen > 1) {
voxloadflag = 1;
}
if (imglen > 0) {
for (let g = 0; g < imglen; g++) {
if (g == 0) {
imageelem[0].setAttribute(“data-adgdisplay”, false);
if (backfillorder == 1 || backfillorder == 3) {
backfillWidgets.adsenseWidget(finalHtmlCss, 1, g, imageelem[0]);
} else if (backfillorder == 2 || backfillorder == 4) {
if (gccflag == 1) {
} else {
backfillWidgets.voxWidget(g, imageelem[g]);
}
}
} else {
if (g > 0) {
if (domainmiddle == “boldsky” || domainmiddle == “https://www.goodreturns.in/news/goodreturns” || domainmiddle == “oneindia” || domainmiddle == “filmibeat”) {
if (g % 2 == 0) {
imageelem[g].setAttribute(“data-adgdisplay”, false);
if (backfillorder == 2 || backfillorder == 4) {
if (gccflag == 1) {
} else {
if (domainmiddle == “https://www.goodreturns.in/news/goodreturns”) {
backfillWidgets.adsenseWidget(finalHtmlCss, 1, g, imageelem[0]);
} else {
backfillWidgets.voxWidget(g, imageelem[g]);
}
}
}
}
} else {
if (g % 2 == 1) {
imageelem[g].setAttribute(“data-adgdisplay”, false);
if (backfillorder == 2 || backfillorder == 4) {
if (gccflag == 1) {
} else {
if (domainmiddle == “https://www.goodreturns.in/news/goodreturns”) {
backfillWidgets.adsenseWidget(finalHtmlCss, 1, g, imageelem[0]);
} else {
backfillWidgets.voxWidget(g, imageelem[g]);
}
}
}
}
}
}
}
}
}
}
}
}
}, 1000);
setTimeout(function () {
clearInterval(countryInt);
}, 10000);
}
});
if (document.querySelector(“.myimg”)) {
var imageelem = document.querySelectorAll(“.myimg”);
var imglen = imageelem.length;
if (imglen > 0) {
for (g = 0; g < imglen; g++) {
if (g == 0) {
imageelem[0].setAttribute(“data-adgdisplay”, false);
if (backfillorder == 1) {
backfillWidgets.adsenseWidget(finalHtmlCss, 2, g, imageelem[g]);
} else if (backfillorder == 2) {
backfillWidgets.voxWidget(g, imageelem[g]);
}
} else if (g == 2) {
imageelem[2].setAttribute(“data-adgdisplay”, false);
backfillWidgets.adsenseWidget(finalHtmlCss, 2, g, imageelem[g]);
} else if (g == 4) {
imageelem[2].setAttribute(“data-adgdisplay”, false);
backfillWidgets.adsenseWidget(finalHtmlCss, 2, g, imageelem[g]);
}
}
}
}
/*—————————————VOX/Adsense Backfil Code Ends——————————————————–*/
/*—————————————Adsense in are-slot-4—————————————————————-*/

function executeAdSenseOnScroll() {
const targetDiv = document.getElementById(“are-slot-5”);

if (!targetDiv) {
console.error(“Ad container div not found”);
return;
}
targetDiv.innerHTML = “”; // Clear the content first
const adScript = document.createElement(“script”);
adScript.async = true;
adScript.src = “https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6601380052549923”;
adScript.setAttribute(“crossorigin”, “anonymous”);
document.head.appendChild(adScript);
const adIns = document.createElement(“ins”);
adIns.className = “adsbygoogle”;
adIns.style.display = “block”;
adIns.setAttribute(“data-ad-client”, “ca-pub-6601380052549923”);
adIns.setAttribute(“data-ad-slot”, “3671027678”);
adIns.setAttribute(“data-ad-format”, “auto”);
adIns.setAttribute(“data-full-width-responsive”, “true”);
targetDiv.appendChild(adIns);
adScript.onload = function () {
try {

} catch (e) {
console.error(“AdSense initialization error:”, e);
}
};
}
// Add scroll event listener to execute AdSense code
/*if(domainmiddle==’filmibeat’ || domainmiddle==’mykhel’ || domainmiddle==’drivespark’ || domainmiddle==’gizbot’ || domainmiddle==’nativeplanet’ || domainmiddle==’boldsky’){
if (/Mobi|Android/i.test(navigator.userAgent)) {
var adsenseFlag=0;
window.addEventListener(‘scroll’, () => {
var targetContainerId = ‘are-slot-5’;
const targetDiv = document.getElementById(‘are-slot-5′);
if (targetDiv) {
if(adsenseFlag==0){
adsenseFlag=1;
if(targetContainerId==’are-slot-5’){
targetDiv.innerHTML=”;
document.getElementById(targetContainerId).classList.remove(‘dynamic-slot’);
loadAdScriptCommon();
(function(g,o){g[o]=g[o]||function(){(g[o][‘q’]=g[o][‘q’]||[]).push(arguments)},g[o][‘t’]=1*new Date})(window,’_googCsa’);
afsAdCallCommon(targetContainerId);
}
}
}
});
}
}*/
if ([].includes(window.location.hostname)) {
if (googletag.apiReady) {
googletag.cmd.push(function () {
const key = “topic”;

// full domain + path
let newValue = window.location.hostname + window.location.pathname;
// get last part of the pathname (slug or ID)
let secondPathName = window.location.pathname.split(“https://www.goodreturns.in/”).at(-1) || “”;
// Try to extract numeric article ID
let articleId = null;
let match = secondPathName.match(/(\d+)(?=\.html$|$)/);
if (match) {
articleId = match[1];
}
// —- Helper: sanitize + trim slug —-
function safeSlug(str) {
// remove extension like .html
str = str.replace(/\.[^/.]+$/, “”);
// keep only letters, numbers, dash, underscore, dot
str = str.replace(/[^a-zA-Z0-9._-]/g, “”);
// truncate to 40 chars (GAM limit)
return str.substring(0, 40) || “na”;
}
// Fallback: generate safe truncated slug if no numeric ID
if (!articleId) {
articleId = safeSlug(secondPathName);
}

// clear any previous targeting
googletag.pubads().clearTargeting(“host”);
googletag.pubads().clearTargeting(“curl”);

// set targeting
googletag.setConfig({
targeting: {
prpm: [articleId], // safe 40-char slug/ID
[key]: [newValue],
},
});

// log what’s being set
const targeting = {};
googletag
.pubads()
.getTargetingKeys()
.forEach((key) => {
targeting[key] = googletag.pubads().getTargeting(key);
});
console.log(“Global targeting:”, targeting);
});
}
}

function dynamicPerformance(divid) {
if (window.googletag && googletag.apiReady && typeof pbjs != “undefined”) {
var PREBID_TIMEOUT = 1200;
var FAILSAFE_TIMEOUT = 3000;
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});
var pbjsrss = pbjs || {};
pbjsrss.que = pbjs.que || [];
var target_words_rss = [];
var getUrlDetailsRss = {
cleanArray: function (item) {
var tempArr = [];
for (var i = 0; i < item.length; i++) {
if (item[i] !== undefined && item[i] != “”) {
tempArr.push(item[i]);
}
}
return tempArr;
},
createArrayFromUrl: function () {
target_words_rss = target_words_rss.concat(window.location.hostname);
var url_host = window.location.hostname.split(“.”);
target_words_rss = target_words_rss.concat(url_host);
var url_path = window.location.pathname.replace(“.html”, “”).split(“https://www.goodreturns.in/”);
target_words_rss = target_words_rss.concat(url_path);
var pathArrLen = url_path.length;
var subUrlPath = url_path[pathArrLen – 1].split(“-“);
target_words_rss = target_words_rss.concat(subUrlPath);
if ([“www.oneindia.com”, “tamil.oneindia.com”].includes(window.location.hostname)) {
let urlWithoutHttps = window.location.href.replace(“https://”, “”);
target_words_rss = target_words_rss.concat(urlWithoutHttps);
}
console.log(“target_words_rss_1”, target_words_rss);
target_words_rss = getUrlDetailsRss.cleanArray(target_words_rss);
console.log(“target_words_rss_2”, target_words_rss);
},
};
getUrlDetailsRss.createArrayFromUrl();

try {
googletag.cmd.push(function () {
slot[850] = googletag.defineSlot(“/1008496/Performance”, [[300, 250], [336, 280], [320, 480], [320, 250], [320, 50], “fluid”, [320, 100]], divid).addService(googletag.pubads());
googletag.pubads().setTargeting(“host”, window.location.hostname);
googletag.pubads().setTargeting(“curl”, window.location.href);
googletag.pubads().setTargeting(“topic”, target_words_rss);
if (domainmiddle == “oneindia”) {
if (langParam == “or”) {
googletag.pubads().setTargeting(“domain”, “www.oneindia.com”);
} else {
googletag.pubads().setTargeting(“domain”, window.location.hostname);
}
} else if (domainmiddle == “https://www.goodreturns.in/news/goodreturns”) {
var domHost = domainmiddle + “.in”;
googletag.pubads().setTargeting(“domain”, domHost);
} else {
var domHost = domainmiddle + “.com”;
googletag.pubads().setTargeting(“domain”, domHost);
}
googletag.pubads().setTargeting(“lang”, langParam);
googletag.pubads().enableSingleRequest();
googletag.enableServices();
googletag.display(divid);
googletag.pubads().refresh([slot[850]]);
});
} catch (err) {
console.log(“Home Page Ad : ” + err);
}
}
}
/* if (domainmiddle == “filmibeat” || domainmiddle == “mykhel” || domainmiddle == “drivespark” || domainmiddle == “gizbot” || domainmiddle == “nativeplanet” || domainmiddle == “boldsky”) {
if (/Mobi|Android/i.test(navigator.userAgent)) {
var adsenseFlag=0;
window.addEventListener(‘scroll’, () => {
var targetContainerId = ‘are-slot-5’;
const targetDiv = document.getElementById(‘are-slot-5’);
if (targetDiv) {
if(adsenseFlag==0){
adsenseFlag=1;
targetDiv.classList.remove(‘dynamic-slot’);
dynamicPerformance(‘are-slot-5’);
}
}
});
}
} */
/*—————————————Adsense in are-slot-4—————————————————————-*/

Suhas
Suhashttps://onlinemaharashtra.com/
Suhas Bhokare is a journalist covering News for https://onlinemaharashtra.com/
RELATED ARTICLES

Most Popular

Recent Comments

Tutorial de trading en gate.io on Insurance Agency Lead Scoring