This commit is contained in:
Supertiger
2025-08-02 09:13:28 +01:00
parent 994302978c
commit 6fc904a9f3
2 changed files with 3 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ export const createLabel = (opts: LabelOpts) => {
return format;
};
const setFormat = (value?: string) => (format = value || "format");
const setFormat = (value?: string) => (format = value || "");
const element = document.createElement("span");
if (opts.interval && opts.update) {

View File

@@ -41,10 +41,8 @@ export const createBatteryModule = (
// const battery = await navigator.getBattery();
const battery = {
// level: Math.random(),
// charging: Math.random() > 0.5,
level: 0.1,
charging: true,
level: Math.random(),
charging: Math.random() > 0.5,
};
const batteryPercent = Math.round(battery.level * 100);