join-via-browser.min.js 1.02 KB
jQuery((function(e){({init:function(){this.cacheVariables(),this.countDown()},cacheVariables:function(){this.$timer=e("#dpn-zvc-timer")},countDown:function(){var t=this.$timer;if(t.length>0){var n=t.data("date"),m=t.data("tz"),a=moment.tz.guess();"Asia/Katmandu"===a&&(a="Asia/Kathmandu");var o=moment.tz(n,m).format(),i=moment.tz(o,a).format("MMM D, YYYY HH:mm:ss"),r=moment.tz(o,a).format(),c=moment().unix(),d=moment(r).unix()-c,l=document.documentElement.lang;e(".sidebar-start-time").html(moment.parseZone(r).locale(l).format("LLLL"));var s=36e5,u=24*s;if(d>0)var f=new Date(i).getTime(),h=setInterval((function(){var e=(new Date).getTime(),t=f-e;document.getElementById("dpn-zvc-timer-days").innerText=Math.floor(t/u),document.getElementById("dpn-zvc-timer-hours").innerText=Math.floor(t%u/s),document.getElementById("dpn-zvc-timer-minutes").innerText=Math.floor(t%s/6e4),document.getElementById("dpn-zvc-timer-seconds").innerText=Math.floor(t%6e4/1e3),t<0&&(clearInterval(h),location.reload())}),1e3);else e(t).remove()}}}).init()}));