hexo-theme-redefine
Version:
Redefine your writing with Hexo Theme Redefine.
2 lines • 648 B
JavaScript
let e=!1;const footerRuntime=()=>{if(!e)return;const t=theme.footerStart;if(!t)return void(e=!1);window.setTimeout(footerRuntime,1e3);const n=new Date(t),o=((new Date).getTime()-n.getTime())/864e5,r=Math.floor(o),i=24*(o-r),m=Math.floor(i),u=60*(i-m),d=Math.floor(u),l=Math.floor(60*(u-d)),a=document.getElementById("runtime_days"),c=document.getElementById("runtime_hours"),f=document.getElementById("runtime_minutes"),s=document.getElementById("runtime_seconds");a&&(a.innerHTML=r),c&&(c.innerHTML=m),f&&(f.innerHTML=d),s&&(s.innerHTML=l)};export default function initFooterRuntime(){e||(e=!0,footerRuntime())}
//# sourceMappingURL=runtime.js.map