item.expiry) {localStorage.removeItem(key);return null;}return item.value;}var htCdp = getWithExpiryCDP(“lh_cdp”);const priorityList = [{targetName: ‘aud_PRLH_Photos’,categoryId: 4996,name_hi: ‘फोटो गैलरी’,name_eng: ‘photos’,type: ‘gallery’,catUrl: ‘/photos/’},{targetName: ‘aud_PRLH_NewsBrief’,categoryId: 1349046,name_hi: ‘न्यूज़ ब्रीफ’,name_eng: ‘News Brief’,catUrl: ‘/news-brief/’},{targetName: ‘aud_PRLH_career’,categoryId: 4979,name_hi: ‘करियर’,name_eng: ‘career’,catUrl: ‘/career/’},{targetName: ‘aud_PRLH_Bihar’,categoryId: 5093,name_hi: ‘बिहार’,name_eng: ‘bihar’,catUrl: ‘/bihar/’},{targetName: ‘aud_PRLH_Videos’,categoryId: 5006,name_hi: ‘वीडियो गैलरी’,name_eng: ‘videos’,type: ‘gallery’,catUrl: ‘/videos/’},{targetName: ‘aud_PRLH_International’,categoryId: 4913,name_hi: ‘विदेश’,name_eng: ‘international’,catUrl: ‘/international/’},{targetName: ‘aud_PRLH_UttarPradesh’,categoryId: 5026,name_hi: ‘उत्तर प्रदेश’,name_eng: ‘uttar-pradesh’,catUrl: ‘/uttar-pradesh/’},{targetName: ‘aud_PRLH_NCR’,categoryId: 5016,name_hi: ‘NCR’,name_eng: ‘ncr’,catUrl: ‘/ncr/’},{targetName: ‘aud_PRLH_National’,categoryId: 4911,name_hi: ‘देश’,name_eng: ‘national’,catUrl: ‘/national/’},{targetName: ‘aud_PRLH_Astrology’,categoryId: 4937,name_hi: ‘धर्म’,name_eng: ‘astrology’,catUrl: ‘/astrology/’},{targetName: ‘aud_PRLH_Cricket’,categoryId: 4925,name_hi: ‘क्रिकेट’,name_eng: ‘cricket’,catUrl: ‘/cricket/’},{targetName: ‘aud_PRLH_Lifestyle’,categoryId: 4969,name_hi: ‘लाइफस्टाइल’,name_eng: ‘lifestyle’,catUrl: ‘/lifestyle/’},{targetName: ‘aud_PRLH_Business’,categoryId: 4950,name_hi: ‘बिजनेस’,name_eng: ‘business’,catUrl: ‘/business/’},{targetName: ‘aud_PRLH_Entertainment’,categoryId: 4916,name_hi: ‘मनोरंजन’,name_eng: ‘entertainment’,catUrl: ‘/entertainment/’},{targetName: ‘aud_PRLH_Gadgets’,categoryId: 4955,name_hi: ‘गैजेट्स’,name_eng: ‘gadgets’,catUrl: ‘/gadgets/’},{targetName: ‘aud_PRLH_Auto’,categoryId: 4962,name_hi: ‘ऑटो’,name_eng: ‘auto’,catUrl: ‘/auto/’}];var cohortsScrollHandler = function (){var element = document.querySelector(“#dak-zar-” + 6916168);var visibleArea = 50;handlAjaxOnScroll(ajaxCallBack, element, visibleArea, cohortsScrollHandler);};if(htCdp && htCdp.length){htCdp = JSON.parse(htCdp);let userPrefCat = getUserBehavCat(htCdp);if(userPrefCat){showPramukhKhabre = false;var ajaxCallBack = function callBack() {getUserPrefNews(6916168, userPrefCat);};window.addEventListener(‘scroll’, cohortsScrollHandler);}}function getUserBehavCat(cohart){for(let i=0; i -1);if(isArraycontainscohart){return priorityList[i];}}return null;}function replaceUserPrefWidget(userPrefCatId){let d = document.getElementById(“widget-rs-“+userPrefCatId);if(d) d.parentNode.removeChild(d);}function getUserPrefNews(stid, category) {var xhr = new XMLHttpRequest();xhr.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {let data = JSON.parse(this.responseText);if(data.response){data = data.response;if(data.length >= 6){if(category.categoryId != 4916){document.getElementById(“dak-zar-” + stid).innerHTML = bindUserPrefHtml(data, category);replaceUserPrefWidget(category.categoryId);lozad(‘.lozad’, {load: function (el) {el.src = el.dataset.src;el.onload = function () {el.classList.add(‘fadeimg’)}}}).observe();}}}}};xhr.open(“GET”, “/ajax/sthaniye-news-update-api/”+category.categoryId+(category.type ? (“/”+category.type) : “”), true);xhr.send();}function bindUserPrefHtml(data, category){if(data && data.length){var ctN = category.catUrl.split(‘/’);ctN = ctN[1];let tempHtml = ”+’
‘+category.name_hi+”+’ और पढ़ें ‘+’]]>
‘;tempHtml += ”;document.getElementById(“for-tech-“+stid).innerHTML = mTechRelHtml;}}};xhr.open(“GET”, “https://tech.hindustantimes.com/fetch-tech-products/taglist?taglist=”+keywords, true);xhr.send(null);}function autoRelated(stid, keywords, subsec){var xhr = new XMLHttpRequest();xhr.timeout = 800;xhr.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {let data = JSON.parse(this.responseText);data = ((subsec == “car”) ? data.carModels : data.bikeModels);if(data && data.length > 1){let mAutoRelHtml = ”+”+”;}mAutoRelHtml += ”;document.getElementById(“for-auto-“+stid).innerHTML = mAutoRelHtml;}}};xhr.open(“POST”, “https://auto.hindustantimes.com/api/lh/auto/widget/get”, true);xhr.setRequestHeader(“Content-Type”, “application/json;”);xhr.send(JSON.stringify({ “tags”: keywords, “subSection”: subsec}));}function manipulateRelated(stid) {var xhr = new XMLHttpRequest();xhr.timeout = 800;xhr.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {let data = JSON.parse(this.responseText);let dataConfig = data.config_version;if(data.items && data.items.length > 1){data = data.items;let mRelHtml = ”;mRelHtml = ”;for(let i=0; i‘;if(data[i].imageObject){mRelHtml += ‘‘;} else{mRelHtml += ‘
‘;}mRelHtml += ‘
‘+data[i].headline+’
‘;}document.getElementById(“rel-“+stid).innerHTML = mRelHtml;snowPlowCust(stid, dataConfig);}}};xhr.open(“GET”, “https://personalize.livehindustan.com/similar-stories?storyId=”+stid+”&propertyId=lh&platformId=web&articleType=gallery&numStories=8”, true);xhr.send();}if(showPramukhKhabre){getDakZarNews(6916168, ‘/ajax/topnews/3127/24’ , ‘प्रमुख खबरें’,’Pramukh Khabar’, 0);}if(stType == ‘news’){var nidRel = 6916168;if(document.getElementById(“rel-“+nidRel)){manipulateRelated(6916168);}let stryUrl = ‘/national/story-nitish-kumar-changed-alliance-in-many-states-happened-this-6916168.html’;let catName = (stryUrl.split(“/”))[1];if(catName == “auto”){if(document.getElementById(“for-auto-“+nidRel)){let tag = document.getElementById(‘currentStoryTag’).value.split(“,”);let autoType = document.getElementById(‘currentStoryCarBike’).value;if(document.getElementById(“for-auto-“+nidRel)){autoRelated(nidRel, tag, autoType);}}} else if(catName == “gadgets”){if(document.getElementById(“for-tech-“+nidRel)){let storyTags = document.getElementById(‘currentStoryTag’).value;if(document.getElementById(“for-tech-“+nidRel)){techRelated(nidRel, storyTags);}}}}function snowPlowCust (nid, abvalue){var styId = document.getElementById(“rel-” + nid);styId.setAttribute(“data-vars-ab”, abvalue);styId.setAttribute(“data-vars-widgettype”, “relatedStories-api”);styId.setAttribute(“data-vars-widgetId”, “0010”);}function rltdSplow(nid, url, order, conval, isDe) {gaClickEvent(‘Related News’, ‘storydetail’, ‘1’, window.location.href, {‘id’: nid, ‘name’: ‘Related News’,’creative’: url, ‘position’: order});window.snowplow(“trackStoryClick”, nid, url, “relatedStories”,{contextMenu: false,linkType: “text”,linkValue:url, position: (conval ? conval : “”),orderNumber: order})}function rfuSplow(name,nid, url, order, conval, isDe) {gaClickEvent(name, ‘storydetail’, ‘1’, window.location.href, {‘id’: nid, ‘name’: name,’creative’: url, ‘position’: order});window.snowplow(“trackStoryClick”, nid, url, (isDe ? “rfuStories-api” : “rfuEditStories”),{contextMenu: false,linkType: “text”,linkValue:url, position: (conval ? conval : “”),orderNumber: order})}function getAjaxNews6916168(data, cid) {if(cid == 0001){data = data.items;var htmdata = ”;for (var i = 0; i
‘ + data[i].headline + ‘
‘;}htmdata += ”;return htmdata;} else{data = data.response;var htmdata = ”;for (var i = 0; i ‘ + ((data[i].field_gallery_type[0].value === ‘image’) ? ‘‘+data[i].field_image.length+’‘ : ‘‘) + ‘
‘ + data[i].field_short_headline[0].value + ‘
‘;}htmdata += ”;return htmdata;}}function getAjNews6916168(cid) {var feedUrl = (cid == 0001 ? “https://personalize.livehindustan.com/trending-stories-section?propertyId=lh&platformId=web§ionName=”+currentCat+”&numStories=5&contentType=news” : “/ajax/sthaniye-news-update-api/” + cid + “/gallery”);var xhr = new XMLHttpRequest();xhr.timeout = 800;xhr.onreadystatechange = function () {if (this.readyState == 4 && this.status == 200) {var response = JSON.parse(this.responseText);var htmlcontent = getAjaxNews6916168(response, cid);document.getElementById(“timeline-6916168”).innerHTML= htmlcontent;}};xhr.open(“GET”, feedUrl, true);xhr.send();}function gtSwi6916168(){var pg = “/national/story-nitish-kumar-changed-alliance-in-many-states-happened-this-6916168.html”;var cat = pg.split(‘/’);switch (cat[1]) {case “entertainment”:getAjNews6916168(5000);break;case “lifestyle”:getAjNews6916168(5001);break;case “gadgets”:getAjNews6916168(5002);break;case “auto”:getAjNews6916168(5003);break;case “national”:getAjNews6916168(0001);break;case “international”:getAjNews6916168(0001);break;case “career”:getAjNews6916168(0001);break;case “cricket”:getAjNews6916168(4996);break;case “astrology”:getAjNews6916168(0001);break;case “business”:getAjNews6916168(0001);break;case “sports”:getAjNews6916168(4996);break;case “blog”:getAjNews6916168(4996);break;case “uttar-pradesh”:getAjNews6916168(0001);break;case “bihar”:getAjNews6916168(0001);break;case “ncr”:getAjNews6916168(0001);break;case “uttarakhand”:getAjNews6916168(0001);break;case “jharkhand”:getAjNews6916168(0001);break;case “madhya-pradesh”:getAjNews6916168(0001);break;case “rajasthan”:getAjNews6916168(0001);break;case “chhattisgarh”:getAjNews6916168(0001);break;case “haryana”:getAjNews6916168(4996);break;case “himachal-pradesh”:getAjNews6916168(0001);break;case “maharashtra”:getAjNews6916168(4996);break;case “punjab”:getAjNews6916168(4996);break;case “jammu-and-kashmir”:getAjNews6916168(0001);break;case “odisha”:getAjNews6916168(4996);break;case “west-bengal”:getAjNews6916168(0001);break;case “tripura”:getAjNews6916168(4996);break;case “chandigarh”:getAjNews6916168(0001);break;case “gujarat”:getAjNews6916168(4996);break;default:getAjNews6916168(4996);}}if(isDesktop){gtSwi6916168()}window.addEventListener(‘scroll’, function() {var element = document.querySelector(‘#story-taboola’);var position = element.getBoundingClientRect();if(position.top = 0 && fireTaboola) {ga(‘send’, ‘event’, ‘Taboola’, ‘click’, ‘Taboola Story’);fireTaboola = false;}});function getTimeCodeFromNum(num) {let seconds = parseInt(num);let minutes = parseInt(seconds / 60);seconds -= minutes * 60;var hours = parseInt(minutes / 60);var s = String(seconds+” % 60);var h = String(hours);minutes -= hours * 60;if (hours === 0) {while (s.length {audioPlayer.querySelector(“.time .length”).textContent = getTimeCodeFromNum(audio.duration);audio.volume = 0.75;},false);var timeline = audioPlayer.querySelector(“.timeline”);timeline.addEventListener(“click”, (e) => {var timelineWidth = window.getComputedStyle(timeline).width;var timeToSeek = (e.offsetX / parseInt(timelineWidth)) * audio.duration;audio.currentTime = timeToSeek;}, false);var volumeSlider = audioPlayer.querySelector(“.controls .volume-slider”);volumeSlider.addEventListener(“click”, (e) => {var sliderWidth = window.getComputedStyle(volumeSlider).width;var newVolume = e.offsetX / parseInt(sliderWidth);audio.volume = newVolume;audioPlayer.querySelector(“.controls .volume-percentage”).style.width =newVolume * 100 + “%”;}, false);setInterval(() => {var progressBar = audioPlayer.querySelector(“.progress”);progressBar.style.width = (audio.currentTime / audio.duration) * 100 + “%”;audioPlayer.querySelector(“.time .current”).textContent = getTimeCodeFromNum(audio.currentTime);}, 500);var playBtn = audioPlayer.querySelector(“.controls .toggle-play”);playBtn.addEventListener(“click”, () => {if (audio.paused) {playBtn.classList.remove(“play”);playBtn.classList.add(“pause”);audioId = document.getElementsByTagName(‘body’)[0].getAttribute(‘data-audioid’);if(audioId){document.getElementById(audioId).getElementsByClassName(‘toggle-play’)[0].click();}document.getElementsByTagName(‘body’)[0].dataset.audioid = ‘story-‘+6916168;audio.play();} else {playBtn.classList.remove(“pause”);playBtn.classList.add(“play”);if(document.getElementsByTagName(‘body’)[0].dataset.audioid){delete document.getElementsByTagName(‘body’)[0].dataset.audioid;}audio.pause();}}, false);audioPlayer.querySelector(“.volume-button”).addEventListener(“click”, () => {var volumeEl = audioPlayer.querySelector(“.volume-container .volume”);audio.muted = !audio.muted;if (audio.muted) {volumeEl.classList.remove(“icono-volumeMedium”);volumeEl.classList.add(“icono-volumeMute”);} else {volumeEl.classList.add(“icono-volumeMedium”);volumeEl.classList.remove(“icono-volumeMute”);}});}}function gat(){ga(‘send’, ‘event’, ‘Google Follow’, ‘click’, ‘Story’);}function personalizestory(){var prsnlstryHtml = “”;var storyId = document.querySelector(‘#currentStoryNid’).value;var xhr = new XMLHttpRequest();xhr.timeout = 8000;xhr.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {let data = JSON.parse(this.responseText);if(data && data.items && data.items.length){for(let i=0; i‘+ data.items[i].shortDescription +’‘;}document.getElementById(“nextStories”).innerHTML = prsnlstryHtml;}}};xhr.open(“GET”, “https://personalize.livehindustan.com/rfu-story-page-lh?storyId=” + storyId + “&propertyId=lh&articleType=story&numStories=9”);xhr.send();}personalizestory();function openInAppTracking(e) {var storyUrl = window.location.href;dapTracker.track(“openInApp”, {url: storyUrl}, “event”);openAppWithEvent(“AppFloatingBanner”, “”, “https://hhiphonehindiapp.page.link/?apn=com.hindustan.hindinews&efr=1&ibi=com.hh.hhiphonehindiapp&isi=1036718012&link=https://www.livehindustan.com/national/story-nitish-kumar-changed-alliance-in-many-states-happened-this-6916168.html”);}openAppLink.onclick = openInAppTracking;
Source