PageSourceSearch

https://fedia.social/assets/unix-clock-CxCpv3lo.js

js fedia.social collected 2026-10-02 06:57:48 UTC 1,727 bytes, 2 lines download raw bytes

1import{u as S}from"./widget-BrT_NbSR.js";import{b as M,w,o as I,p as s,u as t,H as r,q as f,D as _,x as h,t as z,a as u,j as a}from"./vue-Cm77DuTi.js";import{_ as D}from"./app-BC9vAXdb.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const P={key:0,class:"label"},T={class:"time"},B=["textContent"],L=["textContent"],N={key:1,class:"label"},v="unixClock",U=M({__name:"unix-clock",props:{widget:{}},emits:["updateProps"],setup(g,{expose:x,emit:C}){const k={transparent:{type:"boolean",default:!1},fontSize:{type:"number",default:1.5,step:.1},showMs:{type:"boolean",default:!0},showLabel:{type:"boolean",default:!0}},c=g,y=C,{widgetProps:e,configure:b}=S(v,k,c,y);let n;const l=u(""),p=u(""),i=u(!1);let d=null;w(i,o=>{o&&window.setTimeout(()=>{i.value=!1},30)});const m=()=>{const o=new Date;l.value=Math.floor(o.getTime()/1e3).toString(),p.value=Math.floor(o.getTime()%1e3/10).toString().padStart(2,"0"),l.value!==d&&(i.value=!0),d=l.value};return m(),w(()=>e.showMs,()=>{n&&window.clearInterval(n),n=window.setInterval(m,e.showMs?10:1e3)},{immediate:!0}),I(()=>{window.clearInterval(n)}),x({name:v,configure:b,id:c.widget?c.widget.id:null}),(o,E)=>(a(),s("div",{class:h(["mkw-unixClock _monospace",{_panel:!t(e).transparent}]),style:z({fontSize:`${t(e).fontSize}em`})},[t(e).showLabel?(a(),s("div",P,"UNIX Epoch")):r("",!0),f("div",T,[f("span",{textContent:_(l.value)},null,8,B),t(e).showMs?(a(),s("span",{key:0,class:h(["colon",{showColon:i.value}])},":",2)):r("",!0),t(e).showMs?(a(),s("span",{key:1,textContent:_(p.value)},null,8,L)):r("",!0)]),t(e).showLabel?(a(),s("div",N,"UTC")):r("",!0)],6))}}),X=D(U,[["__scopeId","data-v-c55789ac"]]);export{X as default};
2//# sourceMappingURL=unix-clock-CxCpv3lo.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.