News Update from The Hindu – The Hindu 3&&2===parseInt(t[1],10)&&”boolean”==typeof t[3]&&(e=t[3],”function”==typeof t[2]&&t[2](“set”,!0));else if(“ping”===t[0]){const n={gdprApplies:e,cmpLoaded:!1,cmpStatus:”stubCMP”,apiVersion:”2.0″};”function”==typeof t[2]&&t[2](n,!0)}else n.push(t)},a.addEventListener(“message”,function(t){const e=”string”==typeof t.data;let n={};try{n=e?JSON.parse(t.data):t.data}catch(t){}const s=n.__tcfapiCall;s&&window.__tcfapi(s.command,s.version,function(n,a){let o={__tcfapiReturn:{returnValue:n,success:a,callId:s.callId}};e&&(o=JSON.stringify(o)),t.source.postMessage(o,”*”)},s.parameter)},!1))})(); ]]>-1&&(thg.functional=!0),cookieconsent.indexOf(“permit”)>-1&&cookieconsent.indexOf(“3”)>-1&&(thg.advertising=!0)):null==constentbehavior&&(thg.functional=!0,thg.advertising=!0);}); ]]>0){ var regexp = /pwtv=(.*?)(&|$)/g; var matches = regexp.exec(purl); if(matches.length >= 2 && matches[1].length > 0){ profileVersionId = ‘/’+matches[1]; } } var wtads = document.createElement(‘script’); wtads.async = true; wtads.type = ‘text/javascript’; wtads.src = url+profileVersionId+’/pwt.js’; var node = document.getElementsByTagName(‘script’)[0]; node.parentNode.insertBefore(wtads, node); })(); }function loadAPScript(){ !function(a9,a,p,s,t,A,g){if(a[a9])return;function q(c,r){a[a9]._Q.push([c,r])}a[a9]={init:function(){q(“i”,arguments)},fetchBids:function(){q(“f”,arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},_Q:[]};A=p.createElement(s);A.async=!0;A.src=t;g=p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A,g)}(“apstag”,window,document,”script”,”//c.amazon-adsystem.com/aax2/apstag.js”); // initialize apstag and have apstag set bids on the googletag slots when they are returned to the page apstag.init({ pubID: ‘231ec860-73af-421d-9fc4-8ea161815c03’, adServer: ‘googletag’, bidTimeout: 1e3 }); // request the bids for the four googletag slots apstag.fetchBids({ slots: [{ slotID: ‘/22390678/TH_Mweb_Election_300x250’, slotName: ‘div-gpt-ad-1677568564430-1’, sizes: [300, 250] },{ slotID: ‘/22390678/TH_Desktop_Election_970x90’, slotName: ‘div-gpt-ad-1677568564430-0’, sizes: [970, 90] },{ slotID: ‘/22390678/TH_MWeb_Topic_Sticky’, slotName: ‘sectiondivsticky’, sizes: [320, 50] },{ slotID: ‘/22390678/TH_MWeb_Topic_Mid03’, slotName: ‘div-gpt-ad-1661843664158-0’, sizes: [[300, 250], [336, 280]] },{ slotID: ‘/22390678/TH_MWeb_Topic_Mid04’, slotName: ‘div-gpt-ad-1661843816772-0’, sizes: [[300, 250], [336, 280]] },{ slotID: ‘/22390678/TH_MWeb_Topic_Top’, slotName: ‘div-gpt-ad-1661843222786-0’, sizes: [[336, 280], [300, 250]] },{ slotID: ‘/22390678/TH_MWeb_Topic_Mid01’, slotName: ‘secpagetopslotmobile’, sizes: [[300, 250], [336, 280]] },{ slotID: ‘/22390678/TH_MWeb_Topic_Mid02’, slotName: ‘div-gpt-ad-1661843520685-0’, sizes: [[336, 280], [300, 250]] },{ slotID: ‘/22390678/TH_Desktop_Topic_RM’, slotName: ‘div-gpt-ad-1661842588273-0’, sizes: [300, 250] },{ slotID: ‘/22390678/TH_Desktop_Topic_LM’, slotName: ‘div-gpt-ad-1661842879870-0’, sizes: [[300, 600], [300, 250]] },{ slotID: ‘/22390678/TH_Desktop_Topic_RT’, slotName: ‘secpagetopslot’, sizes: [300, 250] },{ slotID: ‘/22390678/TH_Desktop_Topic_Billboard_Top’, slotName: ‘div-gpt-ad-1661840335787-0’, sizes: [[970, 90], [728, 90], [970, 250]] },{ slotID: ‘/22390678/TH_Desktop_Topic_Billboard_Middle’, slotName: ‘div-gpt-ad-1661840558578-0’, sizes: [[970, 90], [728, 90], [970, 250]] }] }, function(bids) { // set apstag bids, then trigger the first request to DFP googletag.cmd.push(function() { apstag.setDisplayBids();if(DevIdf.isMobile){googletag.pubads().refresh(getSlotsViewPort(false));}else{googletag.pubads().refresh(); }}); }); }function getSlotsViewPort(abovefold){ var googletagslots = googletag.pubads().getSlots(); var slots = []; googletagslots.forEach(function(slot) { if(abovefold && slot.getSlotId().toString(2).toLowerCase().match(/(TH_MWeb_AT_Top|TH_MWeb_HP_Top|TH_Desktop_HP_Billboard_Top|TH_Desktop_Topic_Billboard_Top|TH_MWeb_Topic_Top|TH_Desktop_Masthead_970x50|TH_MWeb_Masthead_320x50)/i) === null){ slots.push(slot); }else if(!abovefold && slot.getSlotId().toString(2).toLowerCase().match(/(TH_MWeb_AT_Top|TH_MWeb_HP_Top|TH_Desktop_HP_Billboard_Top|TH_Desktop_Topic_Billboard_Top|TH_MWeb_Topic_Top|TH_Desktop_Masthead_970x50|TH_MWeb_Masthead_320x50)/i) != null){ slots.push(slot); } }); return slots; }Promise.all([userIdentify, thgCookieConsent]).then(function() { if(isNonSubcribedUser() && thg.advertisingCookie()){loadPWTScript();loadAPScript();} }); ]]> 0) { document.getElementsByTagName(“header”)[0].classList.remove(“logout”); document.getElementsByTagName(“header”)[0].classList.add(“login”); } } function thgLogout() { typeof __thg_event != “undefined” ? __thg_event.triggerLogOut(tp.pianoId.getUser()): null; tp.push([“init”, function () { tp = window.tp || []; tp.pianoId.logout() location.reload(); }]); } userIdentify.then(function() { var list = document.querySelectorAll(“.menuuserdetect”); for (var i = 0; i < list.length; ++i) { list[i].style.display = "block" ; } if(isNonSubcribedUser()){ var housing = document.querySelectorAll(".housing-img"); for (var j = 0; j
{ if(response.ok) { return response.json(); } }).then((res) => { if(typeof res.shortLink != ‘undefined’){ $(“.read-in-app a”).attr(“href”, res.shortLink) $(“.read-in-app a > span”).show(); } }); }); function addnewclass(){ require([‘jquery’], function($) { setTimeout(function(){ $(“.read-in-app”).addClass(“nohover”) }, 1000); }); } ]]>= 200 && response.status < 400)) { return response.text(); } }).then(function(respone) { var tpimage = document.querySelectorAll(".menu-todays-paper") for (var j = 0; j
= 200 && response.status
= 200 && response.status
= 20 || hours = 14) { urlParams = “?brief=noon” } fetch(“https://www.thehindu.com/” + todaysBriefUrl + urlParams).then(function (response) { if (response.ok && (response.status >= 200 && response.status
300) { if($( window ).width() > 1200){ $(“#left-bottom-sticky-container”).css(“bottom”, “30px”); return 0; } if($( window ).width() > 1000 && $( window ).width() 600 && $( window ).width() < 1000){ $("#left-bottom-sticky-container").css("bottom", "0px"); return 0; } if($( window ).width()
BACK TO TOP
= 200 && response.status = 200 && response.status current_url.searchParams.has(el)) if (!tp.pianoId.isUserValid() && matched_params.length == 0){ loadScript(“https://accounts.google.com/gsi/client”) } }]) ]]> window.location.reload(), 0700); }]) else { console.log(“Nothing happened…”) } }) .catch(err => console.error(err)); } function cleanArticleUrl() { const params_to_remove = [“utm_source”, “utm_medium”, “utm_campaign”, “utm_term”, “utm_content”] const url_obj = new URL(`${window.location.href}`) url_obj.searchParams.forEach((v, k) => {if (params_to_remove.includes(k)) url_obj.searchParams.delete(k)} ) return url_obj.toString() } function handleResponseUrl() { const url_obj = new URL(window.location.href) const response_id = url_obj.searchParams.get(“response_id”) const redirect_uri = url_obj.searchParams.get(“internal_redirect_uri”) if (!response_id || !redirect_uri) { gsi_container.setAttribute(‘data-auto_prompt’, “true”) return } // If user is already logged in, Do nothing with response_id or redirect_uri // else if (window.tp && window.tp.pianoId.isUserValid()) return; const options = { method: ‘POST’, headers: getHeaders(), body: JSON.stringify({ “response_id”: response_id, “pubId”: “TH” }) } fetch(response_ep, options) .then(function(res) { if (!res.ok) throw new Error(res.statusText) return res.json() }) .then(function(res) { console.log(res) // return if response is not ok OR no access token is present if (!res.data.status === “ok” || !res.data.access_token) return if(window.tp.pianoId) tp.push([‘init’, function() { tp.pianoId.loginByToken(res.data.access_token) window.location.replace(res.data.redirect_uri) }]) else window.location.replace(res.data.redirect_uri) }) .catch(err => console.error(“Error: “, err)); } function getHeaders() { return { “Accept”: “application/json, text/plain, */*”, “Authorization”: “Basic dGhlaGluZHU6a251cl9DSC1BNVBZVSU4Vw==”, “Content-Type”: “application/json”, } } ]]>
Source