Hot topics close

Real Madrid vs Barcelona: Barca Youngster Lamine Yamal shatters ...

Real Madrid vs Barcelona Barca Youngster Lamine Yamal shatters
Barcelona’s trip to Madrid to face the defending La Liga champions at their home, Santiago Bernabeu, on Saturday resulted in a 4-0 win for the visitors. In this match, Barca teen Lamine Yamal created a new El Clasico record. At the age of 17 years, 106

Real Madrid vs Barcelona: Barca Youngster Lamine Yamal shatters 77-Year-Old El Clasico Record - myKhel

'+btitle+'

'; }else{ dmpHtml += '
  • '+btitle+'
  • '; } } dmpHtml += ''; document.querySelector('.oi-article-wrapper').innerHTML=dmpHtml; } } }) .catch(error => { console.log('Error fetching trending data:', error); }); } catch (error) { console.log('Error fetching data:', error); } } } }); } } if(window.location.search.indexOf('?a2h=1') > -1){ document.addEventListener('DOMContentLoaded', (event) => { let deferredPrompt; let isCustomPopupShown = false; // Create and style the popup elements const pagePopup = document.createElement('div'); pagePopup.id = 'pagePopup'; pagePopup.style.display = 'flex'; pagePopup.style.position = 'fixed'; pagePopup.style.top = '0'; pagePopup.style.left = '0'; pagePopup.style.width = '100%'; pagePopup.style.height = '100%'; pagePopup.style.backgroundColor = 'rgba(0, 0, 0, 0.5)'; pagePopup.style.justifyContent = 'center'; pagePopup.style.alignItems = 'center'; pagePopup.style.zIndex = '9999999'; pagePopup.style.display = 'none'; // Hide initially const popupContent = document.createElement('div'); popupContent.style.backgroundColor = 'white'; popupContent.style.padding = '20px'; popupContent.style.borderRadius = '5px'; popupContent.style.textAlign = 'center'; const popupText = document.createElement('p'); popupText.textContent = 'Would you like to add this app to your home screen?'; popupText.style.fontSize = '14px'; const okButton = document.createElement('button'); okButton.id = 'okButton'; okButton.textContent = 'OK'; okButton.style.padding = '5px'; okButton.style.margin = '5px'; okButton.style.fontSize = '15px'; const cancelButton = document.createElement('button'); cancelButton.id = 'cancelButton'; cancelButton.textContent = 'Cancel'; cancelButton.style.padding = '5px'; cancelButton.style.margin = '5px'; cancelButton.style.fontSize = '15px'; popupContent.appendChild(popupText); popupContent.appendChild(okButton); popupContent.appendChild(cancelButton); pagePopup.appendChild(popupContent); document.body.appendChild(pagePopup); function showCustomPopup() { if (!isCustomPopupShown) { pagePopup.style.display = 'flex'; isCustomPopupShown = true; } } // Function to hide the custom popup function hideCustomPopup() { pagePopup.style.display = 'none'; } // Event listener for the beforeinstallprompt event window.addEventListener('beforeinstallprompt', (e) => { e.preventDefault(); deferredPrompt = e; // Show custom popup only if it hasn't been shown before showCustomPopup(); }); // Event listener for the appinstalled event window.addEventListener('appinstalled', (evt) => { console.log('a2hs installed'); hideCustomPopup(); }); // Event listener for OK button click okButton.addEventListener('click', () => { hideCustomPopup(); if (deferredPrompt) { deferredPrompt.prompt(); deferredPrompt.userChoice.then((choiceResult) => { if (choiceResult.outcome === 'accepted') { console.log('User accepted the A2HS prompt'); } else { console.log('User dismissed the A2HS prompt'); } deferredPrompt = null; }); } }); // Event listener for Cancel button click cancelButton.addEventListener('click', () => { hideCustomPopup(); }); // Check if the app is already installed in standalone mode if (window.matchMedia('(display-mode: standalone)').matches) { hideCustomPopup(); } }); } 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 === 'goodreturns' || domainmiddle === 'drivespark') { 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(); } gtag('config', trackerGA); gtag('event', 'Back Button', { 'event_category': 'momagic', 'event_label': evtLbl, // Change the value dynamic send_to: trackerGA }); trackMoMagic('back-button',evtLbl); } } }); } if(window.location.search.indexOf('?notipopup=1')>-1){ var divElement = document.getElementById("oiNotification"); if(divElement){ divElement.classList.add('shownotf'); /*var element = document.getElementById('bottomAdWrapper'); if(element){ element.classList.add('notifytestbtm'); }*/ } } //if(globalAdObj.gpt==0 || adBlockEnabled){ function eventOneindiaTracker(category, action, label) { gtag('config', trackerGA); gtag('event', category, { 'event_category': action, 'event_label': label, // Change the value dynamic send_to: trackerGA }); return false; } document.addEventListener('DOMContentLoaded', function() { if(document.querySelector('.paidPromo')){ var anchorElements = document.querySelectorAll('.paidPromo'); anchorElements.forEach(function(anchorElement) { anchorElement.addEventListener('click', function(event) { console.log('Additional click event triggered'); var anchorurl = anchorElement.href; eventOneindiaTracker('Paid Article Link Clicks','',anchorurl); }); }); } }); if(domainmiddle=='gizbot'){ if(vidvertoFlag==1){ window.addEventListener('scroll', function loadScriptOnScroll() { var script = document.getElementById("_vidverto-6d7f83b216033802179a1489c7ef0112"); if (!script) { var a = document.createElement("script"); a.id = "_vidverto-6d7f83b216033802179a1489c7ef0112"; a.src = "https://ad.vidverto.io/vidverto/js/aries/v1/invocation.js"; a.setAttribute("fetchpriority", "high"); document.head.appendChild(a); a.onload = function() { var r = window.top; 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("_vidverto-6d7f83b216033802179a1489c7ef0112"); d.setAttribute("id", (d.getAttribute("id") + (new Date()).getTime())); var t = window.frameElement || d; c.mount("12320", t, {width: 1, height: 1}); }); }; window.removeEventListener('scroll', loadScriptOnScroll); } }); } }else if(domainmiddle=='boldsky'){ if(vidvertoFlag==1){ window.addEventListener('scroll', function loadScriptOnScroll() { var script = document.getElementById("_vidverto-153fdf6f6c790a3cc80c870d61542d2a"); if (!script) { var a = document.createElement("script"); a.id = "_vidverto-153fdf6f6c790a3cc80c870d61542d2a"; 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("_vidverto-153fdf6f6c790a3cc80c870d61542d2a"); d.setAttribute("id", (d.getAttribute("id") + (new Date()).getTime())); var t = window.frameElement || d; c.mount("12307", t, { width: 1, height: 1 }); }); window.removeEventListener('scroll', loadScriptOnScroll); } }); } } if(domainmiddle=='oneindia' || domainmiddle=='filmibeat'){ if(trackpagetype=='database'){ if(taboolaFlag==0){ var divElement = document.querySelector("#taboola-below-article-thumbnails"); if (divElement) { // Create the script element const scriptElement = document.createElement("script"); scriptElement.async = true; scriptElement.src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6601380052549923"; scriptElement.crossOrigin = "anonymous"; const insElement = document.createElement("ins"); insElement.className = "adsbygoogle"; insElement.style.display = "block"; insElement.setAttribute("data-ad-client", "ca-pub-6601380052549923"); insElement.setAttribute("data-ad-slot", "1435660509"); insElement.setAttribute("data-ad-format", "autorelaxed"); const pushScript = document.createElement("script"); pushScript.textContent = "(adsbygoogle = window.adsbygoogle || []).push({});"; divElement.appendChild(scriptElement); divElement.appendChild(insElement); divElement.appendChild(pushScript); } } } } var loadbackfillnative=1; if((document.querySelector('head'))&&(document.querySelector('head').hasAttribute('data-restricted_ad'))){ var restictedflag = document.querySelector('head').getAttribute('data-restricted_ad'); if (restictedflag){ loadbackfillnative=0; // To disable the widget from Homepage } } if(loadbackfillnative){ if(trackpagetype!='article'){ if(isBrave){ var paidBraveexe = 0; window.addEventListener('scroll', function() { if (paidBraveexe == 0) { paidBraveexe = 1; var slotElements = document.querySelectorAll('[id*="are-slot"]'); slotElements.forEach(function(element) { var slotId = element.id; if(slotId){ generateBackfillAd(slotId); } }); if(document.getElementById('bottom-sticky')){ generateBackfillAd('bottom-sticky'); } } }); } }else{ if(globalAdObj.gpt==0 || window.location.search.indexOf('?backfill=1')>-1){ var slotElements = document.querySelectorAll('[id*="are-slot"]'); slotElements.forEach(function(element) { var slotId = element.id; if(slotId){ generateBackfillAd(slotId); } }); if(document.getElementById('bottom-sticky')){ generateBackfillAd('bottom-sticky'); } } } } if(trackpagetype=='article'){ if (/Mobi|Android/i.test(navigator.userAgent)) { const styleElement = document.createElement('style'); const cssRules = `.oiadv{margin:28px 0;min-height:280px;padding:12px 0;background:#f5f5f5}.oiadv::before{content:"Advertisement";display:inline-block;font-size:10px;font-family:arial;padding-bottom:5px;color:#ccc;text-transform:uppercase;text-align:center}`; styleElement.textContent = cssRules; document.head.appendChild(styleElement); }else{ const styleElement = document.createElement('style'); const cssRules = `#are-slot-1,#are-slot-2,#are-slot-3,#are-slot-4,#are-slot-5,#are-slot-mr1,#are-slot-mr2{background:#f5f5f5;margin:14px 0;min-height:280px;padding:12px 0;}#are-slot-leaderboard,#are-slot-mr1,#are-slot-mr2,#are-slot-rightrail{background:#f5f5f5;}#are-slot-1::before,#are-slot-2::before,#are-slot-3::before,#are-slot-4::before,#are-slot-5::before,#are-slot-6::before,#are-slot-7::before,#are-slot-mr1::before,#are-slot-mr2::before{content:"Advertisement";display:block;font-size:10px;font-family:arial;padding-bottom:5px;color:#ccc;text-transform:uppercase;text-align:center}`; styleElement.textContent = cssRules; document.head.appendChild(styleElement); } }else if(trackpagetype=='home'){ }else{ if (/Mobi|Android/i.test(navigator.userAgent)) { const styleElement = document.createElement('style'); const cssRules = `.oiadv{margin:28px 0;min-height:280px;padding:12px 0;background:#f5f5f5}.oiadv::before{content:"Advertisement";display:inline-block;font-size:10px;font-family:arial;padding-bottom:5px;color:#ccc;text-transform:uppercase;text-align:center}`; styleElement.textContent = cssRules; document.head.appendChild(styleElement); }else{ const styleElement = document.createElement('style'); const cssRules=`#are-slot-1,#are-slot-2,#are-slot-3,#are-slot-4,#are-slot-5,#are-slot-mr1,#are-slot-mr2{background:#f5f5f5;margin:14px 0;min-height:280px;padding:12px 0;}#are-slot-leaderboard,#are-slot-mr1,#are-slot-mr2{background:#f5f5f5;}#are-slot-1::before,#are-slot-2::before,#are-slot-3::before,#are-slot-4::before,#are-slot-5::before,#are-slot-6::before,#are-slot-7::before,#are-slot-mr1::before,#are-slot-mr2::before{content:"Advertisement";display:block;font-size:10px;font-family:arial;padding-bottom:5px;color:#ccc;text-transform:uppercase;text-align:center}`; styleElement.textContent = cssRules; document.head.appendChild(styleElement); } } //Hitzfeed Widget Code if(trackpagetype=='article'){ if(document.querySelector('.hf_widget_container')){ var hitzexe = 0; window.addEventListener('scroll', function() { if (hitzexe==0){ hitzexe = 1; var dpaFtSc = document.createElement("script"); dpaFtSc.id = "hitzfeed_widget_script"; document.body.appendChild(dpaFtSc); dpaFtSc.async = true; dpaFtSc.src = "https://www.hitzfeed.com/trends/media/js/hitzfeed_widget_new.js"; } }); } } //Hitzfeed Widget Code var twitterflag=1; if(twitterflag==1){ function loadTwitterWidgets() { var tweetDivs = document.querySelectorAll('.twittewdg'); tweetDivs.forEach(function(div) { if (!div.hasAttribute('data-loaded')) { if (div.hasAttribute('data-twittcontnet')) { var tweetContent = div.getAttribute('data-twittcontnet'); var tweetBlockquote = tweetContent.match(/(.*?)/s)[0]; div.innerHTML = tweetBlockquote; div.setAttribute('data-loaded', 'true'); } } }); if (window.twttr && window.twttr.widgets && window.twttr.widgets.load) { window.twttr.widgets.load(); } else { window.twttr = (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], t = window.twttr || {}; if (d.getElementById(id)) return t; js = d.createElement(s); js.id = id; js.src = "https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); t._e = []; t.ready = function(f) { t._e.push(f); }; return t; }(document, "script", "twitter-wjs")); } } function onScrollTwitterWidget() { var twitterBlockquotes = document.querySelectorAll('.twittewdg'); if (twitterBlockquotes.length > 0) { loadTwitterWidgets(); } } window.addEventListener('scroll', onScrollTwitterWidget); } // Define on top var moMagicObj = {'oneindia': 'https://1437953666.rsc.cdn77.org/publisher/7ca85928-f5eb-11ec-83bf-afb6a6e8a7b0/truereachAdRender.js','drivespark':'https://1437953666.rsc.cdn77.org/publisher/460eb521-216f-11ef-b350-dd452b15e880/truereachAdRender.js','mykhel': 'https://1437953666.rsc.cdn77.org/publisher/9864021f-69b2-11ee-afad-e75bb0c6e575/truereachAdRender.js','filmibeat': 'https://1437953666.rsc.cdn77.org/publisher/dca36f8d-69a6-11ee-afad-1feb59fc7432/truereachAdRender.js','goodreturns':'https://1437953666.rsc.cdn77.org/publisher/65240bde-69a7-11ee-afad-01f404c59a40/truereachAdRender.js'}; var moMagicHost = ['oneindia','drivespark','mykhel','filmibeat','goodreturns']; 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); gtag('config', trackerGA); gtag('event', 'interstitial', { 'event_category': 'momagic', 'event_label': evtLbl, // Change the value dynamic send_to: trackerGA }); }else{ var moMagicSession = sessionStorage.getItem("moMagicSession"); if (moMagicSession) { trackMoMagic('referral',evtLbl); gtag('config', trackerGA); gtag('event', 'interstitial', { 'event_category': 'momagic', 'event_label': evtLbl, // Change the value dynamic send_to: trackerGA }); }else{ sessionStorage.setItem("moMagicSession",1); } } } } } } if (/Mobi|Android/i.test(navigator.userAgent)) { if(document.getElementById('taboola-below-article-thumbnails')){ const taboolaElement = document.getElementById('taboola-below-article-thumbnails'); let popupsHidden = false; function fadeOut(element,sl) { if(sl==1){ element.classList.add('hideBottom'); }else{ element.style.transition='opacity 1s'; element.style.opacity=0; } } function fadeIn(element,sl) { if(sl==1){ element.classList.remove('hideBottom'); }else{ element.style.transition='opacity 1s'; element.style.opacity = 1; } } function handleScrollPopup() { var popup1,popup2,popup3; const taboolaRect = taboolaElement.getBoundingClientRect(); const windowHeight = window.innerHeight; const distanceFromBottom = taboolaRect.top - windowHeight; if (distanceFromBottom 0 ? clickedElement : clickedElement.closest('div[class]'); var className = nearestDivWithClass !== null ? nearestDivWithClass.getAttribute('class') : 'NA'; //console.log(x + "XY" + className); //console.log(className); var clickData = JSON.parse(localStorage.getItem('clickData')) || {}; if (!clickData[dt]) { clickData[dt] = {}; } if (!clickData[dt][this.pageType]) { clickData[dt][this.pageType] = []; } var data = clickData[dt][this.pageType]; var existingYIndex = data.findIndex(function(record) { return record.y === y; }); if (existingYIndex !== -1) { var existingXIndex = data[existingYIndex].data.findIndex(function(subRecord) { return subRecord.x === x; }); if (existingXIndex !== -1) { data[existingYIndex].data[existingXIndex].value++; } else { data[existingYIndex].data.push({ x: x, value: 1 }); } } else { data.push({ y: y,elem:className, data: [{ x: x, value: 1 }] }); } clickData[dt][this.pageType] = data; console.log(clickData); localStorage.setItem('clickData', JSON.stringify(clickData)); } } }, generateDataFromLocalStorage: function(article,heatmapInstance) { var pageType = this.pageType; var apiurl = "https://dmp.oneindia.com/api/heat-map?website_name="+window.location.hostname; fetch(apiurl,{ method: "GET", }).then(function(e) { e.text().then(function(data){ if(data != '' && data != undefined && data != null){ var jdata = data; var clickData = JSON.parse(jdata) || this.testData; var points = []; var max = 0; var elementData = {}; var elementCoordinates = {}; clickData = clickData[dt][pageType] || []; if (clickData.length > 0) { clickData.forEach(function(record) { if (record.elem !== "NA") { if (!elementData[record.elem]) { elementData[record.elem] = { x: 0, y: record.y, value: 0 }; } record.data.forEach(function(subRecord) { elementData[record.elem].value += subRecord.value; max = Math.max(max, subRecord.value); if (!elementCoordinates[record.elem]) { elementCoordinates[record.elem] = []; } elementCoordinates[record.elem].push({ x: subRecord.x, y: record.y,value:subRecord.value}); }); } else { // When elem is 'NA', push the subRecord data directly into points record.data.forEach(function(subRecord) { if(subRecord.x!=0 && record.y!=0){ points.push({ x: subRecord.x, y: record.y, value: subRecord.value }); } max = Math.max(max, subRecord.value); }); } }); console.log(elementCoordinates); for (var elem in elementData) { if (elem !== "NA") { var x = 0; // Default value for x coordinate var y = 0; // Default value for y coordinate var element = document.querySelector('[class="' + elem + '"]'); if (element) { // Check if the specific `elem` exists in elementCoordinates if (elementCoordinates[elem]) { var entry = elementCoordinates[elem]; entry.forEach(function(dataPoint) { x = dataPoint.x; y = dataPoint.y; var value = dataPoint.value; var point = { x: x, y: y, value: value }; points.push(point); max = Math.max(max, value); }); } } else { // Fallback for missing elements, using coordinates from elementCoordinates if (elementCoordinates[elem] && elementCoordinates[elem].length > 0) { var coords = elementCoordinates[elem][0]; // Assuming we take the first set of coordinates x = coords.x; y = coords.y; var value = coords.value; if (x !== 0 && y !== 0) { var point = { x: x, y: y, value: value }; points.push(point); } } } } } } console.log(points); var outputdata = { max: max, data: points }; console.log('Data:', outputdata); if(outputdata){ if(outputdata.data.length > 0){ heatmapInstance.setData(outputdata); var tooltip = document.createElement('div'); tooltip.classList.add('tooltip'); tooltip.style.position = 'absolute'; tooltip.style.background = 'rgba(0, 0, 0, .8)'; tooltip.style.color = 'white'; tooltip.style.fontSize = '14px'; tooltip.style.padding = '5px'; tooltip.style.lineHeight = '18px'; tooltip.style.display = 'none'; tooltip.style.zIndex = '9999999'; article.appendChild(tooltip); article.onmousemove = function(ev) { var rect = ev.target.getBoundingClientRect(); var x = ev.clientX - rect.left; var y = ev.clientY - rect.top; var value = heatmapInstance.getValueAt({ x: x, y: y }); HeatmapCalculator.updateTooltip(x, y, value,tooltip); }; article.onmouseout = function() { tooltip.style.display = 'none'; }; var heatmapCanvas = article.querySelector('.heatmap-canvas'); heatmapCanvas.style.position = 'absolute'; heatmapCanvas.style.top = '0'; heatmapCanvas.style.left = '0'; heatmapCanvas.style.background = '#333'; heatmapCanvas.style.opacity = '0.8'; heatmapCanvas.style.zIndex = '999999'; heatmapInstance._renderer.onError = function(error) { console.log('Heatmap.js Error:', error); }; } } } }); })["catch"](function(e) { console.log("Fetch Error :-S", e); return ''; }); }, updateTooltip:function(x, y, value,tooltip){ tooltip.style.left = (x + 15) + 'px'; // Adjust tooltip position tooltip.style.top = (y + 15) + 'px'; // Adjust tooltip position var finalval = "Clicks: " + value; tooltip.innerHTML = finalval; tooltip.style.display = 'block'; // Display tooltip }, initializeHeatmap:function(article, heatmapInstance){ this.generateDataFromLocalStorage(article,heatmapInstance); }, checkRequireAndInitialize:function(article){ if (typeof require !== 'undefined') { require.config({ paths: { 'heatmap': 'https://cdn.jsdelivr.net/npm/heatmap.js/build/heatmap.min' // Path to Heatmap.js }, shim: { 'heatmap': { exports: 'h337' // Export the global variable 'h337' used by Heatmap.js } } }); require(['heatmap'], function(heatmap) { var heatmapInstance = heatmap.create({ container: document.body }); HeatmapCalculator.initializeHeatmap(article, heatmapInstance); }); } else { var self = this; setTimeout(function() { self.checkRequireAndInitialize(article); }, 100); } }, init:function(docElement){ document.addEventListener('click', function(event) { if (event.target.closest('body')) { HeatmapCalculator.userHandleClick(event); } }); if (window.location.search.indexOf('?heatmap=1') > -1) { /*var clickData = this.clickData || this.testData; var clickData=clickData[dt][this.pageType] || []; if (clickData.length > 0) {*/ document.querySelectorAll('div[id^="are-slot-"]').forEach(function(element) { element.classList.remove('oi-axt','oiadv'); element.remove(); }); if(document.getElementById('taboola-below-article-thumbnails')){ document.getElementById('taboola-below-article-thumbnails').remove(); } if(document.getElementById("oitaboolacontainer1")){ document.getElementById("oitaboolacontainer1").style.display='none'; } if(document.getElementById("stickymaincon")){ document.getElementById("stickymaincon").style.display='none'; } affinityInserted=true; this.checkRequireAndInitialize(docElement); //} } } }; function postHeatmapDataToAPI() { var postData = localStorage.getItem('clickData'); if (postData) { var jsonData = JSON.parse(postData); var url = 'https://dmp.oneindia.com/api/heat-map?website_name='+window.location.hostname; var options = { method: 'POST', mode:'no-cors', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(jsonData) }; fetch(url, options) .then(response => { console.log('Data posted successfully:', response); }) .catch(error => { console.log('Error posting data:', error); }); } else { console.warn('No data found in localStorage to post.'); } } if(domainmiddle=='oneindia' || domainmiddle=='filmibeat'){ function checkLastAPICallHeatmap() { var lastAPICallTimestamp = localStorage.getItem('lastAPICallTimestampheatmap'); if (!lastAPICallTimestamp) { postHeatmapDataToAPI(); localStorage.setItem('lastAPICallTimestampheatmap', Date.now()); } else { var currentTime = Date.now(); var timeDifference = currentTime - parseInt(lastAPICallTimestamp); if (timeDifference >= 24 * 60 * 60 * 1000) { postHeatmapDataToAPI(); localStorage.setItem('lastAPICallTimestampheatmap', currentTime); } } } document.addEventListener('DOMContentLoaded', function() { //if (window.location.search.indexOf('?heatmap=1') > -1) { var docElement = document.querySelector('html'); if (docElement) { HeatmapCalculator.init(docElement); checkLastAPICallHeatmap(); setInterval(checkLastAPICallHeatmap, 60 * 1000); } //} }); } var uid=''; if (window.location.search.indexOf('?uid=1') > -1) { uid = localStorage.getItem('oibengali_subscription_id'); alert(uid); if (document.querySelector('#containerMain')) { var newDiv = document.createElement('div'); newDiv.innerHTML = uid; newDiv.style.fontWeight = 'bold'; newDiv.style.fontSize = '30px'; var containerMain = document.querySelector('#containerMain'); if (containerMain.firstChild) { containerMain.insertBefore(newDiv, containerMain.firstChild); } else { containerMain.appendChild(newDiv); } } } /* Code Starts - For Users coming from A2H top share should show */ if (window.matchMedia('(display-mode: standalone)').matches) { if(document.querySelector('.one-head-share')){ document.querySelector('.one-head-share').style.cssText='display:block!important'; } } /* Code Ends - For Users coming from A2H top share should show */ /* Code Starts - Common Function for GA trigger used by Other Modules */ function generateVPV(pagePath){ if(pagePath=="" || pagePath=="undefined" || pagePath==null){ pagePath = window.location.href; } var mainurl = window.location.href; if (document.querySelector('link[rel="canonical"]') && document.querySelector('link[rel="canonical"]').hasAttribute('href')) { mainurl = document.querySelector('link[rel="canonical"]').getAttribute('href'); //document.location.href; } gtag('event', 'page_view', { page_location: pagePath, page_path: pagePath, send_to: liveGA }); gtag('event', 'page_view', { page_location: pagePath, page_path: pagePath, send_to: rosGA }); gtag('event', 'page_view', { page_location: pagePath, page_path: pagePath, send_to: universalGA }); var trackurl = pagePath; if(host1=='www.oneindia.com'){ var _comscore = _comscore || []; _comscore.push({ c1: "2", c2: "7732551", cs_fpid: universal_userid, cs_fpit: null, cs_fpdm: null, cs_fpdt: null, options: { enableFirstPartyCookie: true } }); (function() { var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true; s.src = "https://sb.scorecardresearch.com/cs/7732551/beacon.js"; el.parentNode.insertBefore(s, el); })(); }else{ var jcode = 'var _comscore = _comscore || []; var comscoreParams = { c1: "2", c2: "7732551", c3: "", c4: "' + trackurl + '", c5: "", c6: "", c15: "",options:{enableFirstPartyCookie: true}}; _comscore.push(comscoreParams); var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true; s.src = (document.location.protocol == "https:" ? "https://sb" : "https://b") + ".scorecardresearch.com/beacon.js"; el.parentNode.insertBefore(s, el);'; setTimeout(jcode, 500); } } /* Code Starts - Common Function for GA trigger used by Other Modules */ if (domainmiddle === 'mykhel') { if (document.getElementById('are-score-board')) { var intervalId; function checkEmpty(){ googletag.pubads().addEventListener('slotRenderEnded', function(event) { var res = event.slot.getResponseInformation(); var unitname=event.slot.getAdUnitPath(); var adSlot = document.getElementById('are-score-board'); if(unitname==='/1008496/myKhel-scoreboard'){ if(res != null && res != '' && res != undefined){ if(adSlot){ showParentElement(adSlot); } }else{ if(adSlot){ hideParentElement(adSlot); } } } }); } function refreshAdIfEmpty() { var adSlot = document.getElementById('are-score-board'); if (adSlot && adSlot.innerHTML.trim() === '') { if (googletag) { googletag.cmd.push(function () { var webslot = googletag.pubads().getSlots().find(function (slot) { return slot.getSlotElementId() === 'are-score-board'; }); if (webslot) { googletag.pubads().refresh([webslot]); checkEmpty(); } else { displayCampaignTop(); } }); } } } function hideParentElement(element) { if (element && element.parentElement) { element.parentElement.style.display = 'none'; } } function showParentElement(element) { if (element && element.parentElement) { element.parentElement.style.display = ''; } } function displayCampaignTop() { setTimeout(function () { if (googletag) { googletag.cmd.push(function () { var webslot = googletag.defineSlot('/1008496/myKhel-scoreboard', [[300, 180], [300, 100]], "are-score-board").addService(googletag.pubads()); googletag.pubads().setTargeting('domain', 'mykhel.com'); googletag.pubads().setTargeting('lang', langParam); googletag.pubads().enableSingleRequest(); googletag.enableServices(); googletag.display("are-score-board"); googletag.pubads().refresh([webslot]); checkEmpty(); }); } }, 400); } intervalId = setInterval(refreshAdIfEmpty, 5000); // Check every 5 seconds if (document.getElementById('are-score-board')) { displayCampaignTop('are-score-board'); } } } /* Code Starts - Code for AFS in are slot 6 */ function insertCodeInDiv() { var divElement = document.querySelector("#are-slot-6"); if (divElement) { divElement.classList.remove('dynamic-slot'); divElement.innerHTML=''; var newDiv = document.createElement("div"); newDiv.setAttribute("id", "relatedsearches"); divElement.appendChild(newDiv); } } var isAdScriptLoaded = false; var isAdCalled = false; function loadAdScript() { if (!isAdScriptLoaded) { var script = document.createElement('script'); script.setAttribute('data-cfasync', 'false'); script.async = true; script.src = 'https://www.google.com/adsense/search/ads.js'; document.head.appendChild(script); isAdScriptLoaded = true; } } function afsAdCall() { if (!isAdCalled) { var reqUrl = "https://"+host1+"/search/results.html"; var pageOptions = { "pubId": "partner-pub-6601380052549923", "styleId": "9998292378", "relatedSearchTargeting": "content", "resultsPageBaseUrl": reqUrl, "resultsPageQueryParam": "q" }; var rsblock1 = { "container": "relatedsearches", "relatedSearches": 4, 'adLoadedCallback': function(containerName, adsLoaded, isExperimentVariant, callbackOptions) { console.log(callbackOptions); if (adsLoaded) { try { console.log('Ad is loaded'); } catch (e) { console.log('Ad will not load here...'); } } else { console.log('We can load another ad here...'); } } }; _googCsa('relatedsearch', pageOptions, rsblock1); isAdCalled = true; } } if(domainmiddle=='oneindia' && trackpagetype=='article'){ if(deviceType=='phone'){ if(adpushupflag==0){ insertCodeInDiv(); } }else{ var cmsContentRight = document.getElementById("taboola-right-rail-thumbnails"); var newDiv = document.createElement("div"); newDiv.id = "relatedsearches"; if (cmsContentRight) { cmsContentRight.insertAdjacentElement('beforebegin', newDiv); } } window.addEventListener('scroll', function() { if (document.getElementById('relatedsearches')) { loadAdScript(); (function(g,o){g[o]=g[o]||function(){(g[o]['q']=g[o]['q']||[]).push(arguments)},g[o]['t']=1*new Date})(window,'_googCsa'); var scrollDepth = window.scrollY || document.documentElement.scrollTop; if (scrollDepth > 10 && !isAdCalled) { afsAdCall(); } } }); } /* Code Ends - Code for AFS in are slot 6 */ 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+'/' + timestamp + '/index?t=' + timestamp; m.parentNode.insertBefore(a,m); } if(affMatrix==1){ if (/Mobi|Android/i.test(navigator.userAgent)) { if(domainmiddle=='filmibeat' || domainmiddle=='goodreturns' || domainmiddle=='drivespark' || domainmiddle=='oneindia' || domainmiddle=='boldsky' || domainmiddle=='mykhel' || domainmiddle=='gizbot' || domainmiddle=='nativeplanet' || domainmiddle=='careerindia'){ if(trackpagetype!='home'){ var affinityInserted = false; window.addEventListener("scroll", function () { if (!affinityInserted) { affinityMatrix(); affinityInserted = true; } }); } } }else{ if(domainmiddle=='filmibeat' || domainmiddle=='goodreturns' || domainmiddle=='drivespark' || domainmiddle=='oneindia' || domainmiddle=='boldsky' || domainmiddle=='mykhel' || domainmiddle=='gizbot' || domainmiddle=='nativeplanet' || domainmiddle=='careerindia'){ if(trackpagetype!='home'){ var affinityInserted = false; window.addEventListener("scroll", function () { if (!affinityInserted) { affinityMatrix(); affinityInserted = true; } }); } } } } /*VOX Code Starts*/ /* VOX ad 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){ console.log("Vox Loading Flag :"+voxloadflag); if(document.getElementById("oi-vox")) { var sspflag = 0; window.addEventListener("scroll", function(){ 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); } }); }); } }, 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); (adsbygoogle = window.adsbygoogle || []).push({}); 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 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); }, adsmartifai:function(){ return false; var scriptElement = document.createElement('script'); scriptElement.src = 'https://ssptag.smartifai.ai/?c=res&m=ads'; scriptElement.async = true; scriptElement.onload = function() { tmv.appendAd({ placementId: 412, type: "inImage" }); }; document.head.appendChild(scriptElement); } }; 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 gcccountryCodes = ['BH','KW','OM','QA','SA','AE']; var gcccountryCodesInd = ['IN']; var countryInt; countryInt = setInterval(function(){ if(document.body){ var gapiDetails = document.body.getAttribute('data-gapi'); if(gapiDetails){ clearInterval(countryInt); var tmpgapijson = JSON.stringify(gapiDetails); var jdata = gapiDetails; jdata = JSON.parse(jdata); console.log(jdata); con_code = jdata.country_code; if(gcccountryCodes.includes(con_code)){ gccflag=1333; } 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(g=0;g0){ if(domainmiddle == 'boldsky' || domainmiddle=='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=='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=='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

    '+k1+'

    '+k2+' | '+k3+' | '+k4+'

    '; var wcPromoHtmlWeb=''; }else{ var wcPromoCssMobi=""; var wcPromoCssWeb=""; var wcPromoHtmlMobi=''; var wcPromoHtmlWeb=''; } if (/Mobi|Android/i.test(navigator.userAgent)) { var wcflag = 0; window.addEventListener("scroll", function(){ if(wcflag==0){ if(document.querySelector('#are-slot-1')){ var parent_div = document.querySelector('#are-slot-1'); wcflag=1; var finalHtmlCssWc = wcPromoCssMobi+wcPromoHtmlMobi; //document.querySelector('#taboola-mid-home-stream-article').style.display='none'; var wc_promotion_div = document.createElement('div'); wc_promotion_div.id = 'mid-promotion'; wc_promotion_div.innerHTML=finalHtmlCssWc; oiinsertAfterWc(parent_div, wc_promotion_div); } } }); }else{ if(deskflag==1){ var conElem = document.querySelector('#are-slot-2'); if(conElem){ var parent_div = conElem; wcflag=1; var finalHtmlCssWc = wcPromoCssWeb+wcPromoHtmlWeb; //document.querySelector('#taboola-mid-home-stream-article').style.display='none'; var wc_promotion_div = document.createElement('div'); wc_promotion_div.id = 'mid-promotion'; wc_promotion_div.innerHTML=finalHtmlCssWc; oiinsertAfterWc(parent_div, wc_promotion_div); } } } } } } if(window.location.search.indexOf('?ao=1') > -1){ var totalNoOfFolds=1,totalNoOfAds=0,avgFolds=1,adfetched=0,adfilled=0,lineitemid='NA',creativeid='NA'; var globalDataObj={}; mykhelSticky=0; refiner_live=0; globalAdObj.outstream=0; globalAdObj.cube=0; liteflag=1; // Initialize an array of script URLs if(domainmiddle=='drivespark'){ var scriptUrls = [ { key: 'amazon', url: 'https://c.amazon-adsystem.com/aax2/apstag.js' }, { key: 'prebid', url: '/common/oijs/prebid-without-appnex.js' }, { key: 'gpt', url: 'https://securepubads.g.doubleclick.net/tag/js/gpt.js' } ]; }else{ var scriptUrls = [ { key: 'amazon', url: 'https://c.amazon-adsystem.com/aax2/apstag.js' }, { key: 'prebid', url: '/common/oijs/prebid.js' }, { key: 'gpt', url: 'https://securepubads.g.doubleclick.net/tag/js/gpt.js' } ]; } var bidData = []; var excludedSizes = []; // Sizes to exclude function isSizeExcluded(bidSizes) { return bidSizes.some(function (bidSize) { return excludedSizes.some(function (excludedSize) { return ( bidSize[0] === excludedSize[0] && bidSize[1] === excludedSize[1] ); }); }); } // Define an array to store ad details // Define an object to store ad details with ad unit names as keys var adDetailsObject = {}; googletag.cmd.push(function() { function onAdResponse(adEvent) { var adUnit = adEvent.slot.getAdUnitPath(); var isEmpty = adEvent.isEmpty; var lineItemId = adEvent.lineItemId; var creativeId = adEvent.creativeId; var slotId = adEvent.slot.getSlotElementId(); // Create an object with ad details var adDetail = { isEmpty: isEmpty, lineItemId: lineItemId, creativeId: creativeId, slotId: slotId, }; adDetailsObject[adUnit] = adDetail; } googletag.pubads().addEventListener('slotRenderEnded', onAdResponse); }); function findMatchingObject(obj, value) { for (var key in obj) { if (obj.hasOwnProperty(key)) { if (obj[key].slotId === value) { return obj[key]; } } } return 0; // Return null if no match is found } function getAdDetailsByUnitName(unitName,cpmval,displayval) { if (adDetailsObject[unitName]) { var adDetails = adDetailsObject[unitName]; var isempty = adDetails.isEmpty; var lineitem_id = adDetails.lineItemId === null ? 'NA' : adDetails.lineItemId; var createive_id = adDetails.creativeId === null ? 'NA' : adDetails.creativeId; if(isempty==false){ var tmpadfetched=1; var tmpadfilled=1; var tmplineitemid=lineitem_id; var tmpcreativeid=createive_id; globalDataObj[displayval] = {'name':unitName,'value':cpmval,'Ad_fetched':tmpadfetched,'Ad_display':tmpadfilled,'lineItem':tmplineitemid,'creativeId':tmpcreativeid}; }else{ globalDataObj[displayval] = {'name':unitName,'value':cpmval,'Ad_fetched':adfetched,'Ad_display':adfilled,'lineItem':l
    Similar shots
    News Archive
    • Ashton Kutcher
      Ashton Kutcher
      Reese Witherspoon, Ashton Kutcher on New Rom-Com 'Your Place ...
      11 Feb 2023
      1
    • Chiefs vs Saints
      Chiefs vs Saints
      Chiefs maintain unbeaten start to season with comfortable victory ...
      23 days ago
      3
    • Meningococcal
      Meningococcal
      'Beautiful' hairdresser, 23, dies after contracting meningococcal ...
      29 May 2023
      8
    • Casey Kopua
      Casey Kopua
      This World Cup's for you, Casey Kopua
      21 Jul 2019
      1
    • Jay Slater missing
      Jay Slater missing
      Jay Slater: British teen missing in Tenerife had cut his leg and didn't ...
      19 Jun 2024
      7