Fix type errors in Ross-mods.js

This commit is contained in:
Cohee
2025-07-28 22:26:01 +03:00
parent e712ededc9
commit a28a33cb02
+8 -7
View File
@@ -111,12 +111,12 @@ export function humanizeGenTime(total_gen_time) {
let hours = time_spent % 24;
time_spent = Math.floor(time_spent / 24);
let days = time_spent;
time_spent = '';
if (days > 0) { time_spent += `${days} Days, `; }
if (hours > 0) { time_spent += `${hours} Hours, `; }
if (minutes > 0) { time_spent += `${minutes} Minutes, `; }
time_spent += `${seconds} Seconds`;
return time_spent;
let result = '';
if (days > 0) { result += `${days} Days, `; }
if (hours > 0) { result += `${hours} Hours, `; }
if (minutes > 0) { result += `${minutes} Minutes, `; }
result += `${seconds} Seconds`;
return result;
}
/**
@@ -528,7 +528,8 @@ export function dragElement($elmnt) {
return;
}
const style = getComputedStyle($target[0]);
const element = /** @type {HTMLElement} */ ($target[0]);
const style = getComputedStyle(element);
height = parseInt(style.height);
width = parseInt(style.width);
top = parseInt(style.top);