Fix type errors in Ross-mods.js
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user