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-” + 6796438);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(6796438, 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){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(6796438, ‘/ajax/topnews/3127/24’ , ‘प्रमुख खबरें’,’Pramukh Khabar’, 0);}if(stType == ‘news’){var nidRel = 6796438;if(document.getElementById(“rel-“+nidRel)){manipulateRelated(6796438);}let stryUrl = ‘/entertainment/tv/story-ankita-lokhande-shares-pavitra-rishta-set-video-to-be-demolished-where-the-love-story-with-sushant-singh-rajput-begin-6796438.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 getAjaxNews6796438(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 getAjNews6796438(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 = getAjaxNews6796438(response, cid);document.getElementById(“timeline-6796438”).innerHTML= htmlcontent;}};xhr.open(“GET”, feedUrl, true);xhr.send();}function gtSwi6796438(){var pg = “/entertainment/tv/story-ankita-lokhande-shares-pavitra-rishta-set-video-to-be-demolished-where-the-love-story-with-sushant-singh-rajput-begin-6796438.html”;var cat = pg.split(‘/’);switch (cat[1]) {case “entertainment”:getAjNews6796438(5000);break;case “lifestyle”:getAjNews6796438(5001);break;case “gadgets”:getAjNews6796438(5002);break;case “auto”:getAjNews6796438(5003);break;case “national”:getAjNews6796438(0001);break;case “international”:getAjNews6796438(0001);break;case “career”:getAjNews6796438(0001);break;case “cricket”:getAjNews6796438(4996);break;case “astrology”:getAjNews6796438(0001);break;case “business”:getAjNews6796438(0001);break;case “sports”:getAjNews6796438(4996);break;case “blog”:getAjNews6796438(4996);break;case “uttar-pradesh”:getAjNews6796438(0001);break;case “bihar”:getAjNews6796438(0001);break;case “ncr”:getAjNews6796438(0001);break;case “uttarakhand”:getAjNews6796438(0001);break;case “jharkhand”:getAjNews6796438(0001);break;case “madhya-pradesh”:getAjNews6796438(0001);break;case “rajasthan”:getAjNews6796438(0001);break;case “chhattisgarh”:getAjNews6796438(0001);break;case “haryana”:getAjNews6796438(4996);break;case “himachal-pradesh”:getAjNews6796438(0001);break;case “maharashtra”:getAjNews6796438(4996);break;case “punjab”:getAjNews6796438(4996);break;case “jammu-and-kashmir”:getAjNews6796438(0001);break;case “odisha”:getAjNews6796438(4996);break;case “west-bengal”:getAjNews6796438(0001);break;case “tripura”:getAjNews6796438(4996);break;case “chandigarh”:getAjNews6796438(0001);break;case “gujarat”:getAjNews6796438(4996);break;default:getAjNews6796438(4996);}}if(isDesktop){gtSwi6796438()}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-‘+6796438;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 getTimeCodeFromNum(num) {let seconds = parseInt(num);let minutes = parseInt(seconds / 60);seconds -= minutes * 60;var hours = parseInt(minutes / 60);minutes -= hours * 60;if (hours === 0) {return minutes+”:”+String(seconds+” % 60).padStart(2, 0);}else {return String(hours).padStart(2, 0)+”:”+minutes+”:”+String(seconds+” % 60).padStart(2, 0);}}}if(document.getElementById(‘text-speech’)){audioPlayerControl();}function gat(){ga(‘send’, ‘event’, ‘Google Follow’, ‘click’, ‘Story’);}function personalizestory(){var prsnlstryHtml = “”;var ht_fp_Id = getCookie(“_ht_fp”);var xhr = new XMLHttpRequest();xhr.timeout = 8000;xhr.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {let data = JSON.parse(this.responseText);console.log(data);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?htfpId=” + ht_fp_Id + “&propertyId=lh&numStories=9”);xhr.send();}function openInAppTracking(e) {var storyUrl = storyPageUrl.value;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/entertainment/tv/story-ankita-lokhande-shares-pavitra-rishta-set-video-to-be-demolished-where-the-love-story-with-sushant-singh-rajput-begin-6796438.html”);}openAppLink.onclick = openInAppTracking;
Source