mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-28 05:10:50 +03:00
Added basic react submission confirmation notice
This commit is contained in:
15
src/utils.ts
15
src/utils.ts
@@ -256,6 +256,21 @@ class Utils {
|
||||
xmlhttp.send();
|
||||
}
|
||||
|
||||
getFormattedTime(seconds) {
|
||||
let minutes = Math.floor(seconds / 60);
|
||||
let secondsNum: number = Math.round(seconds - minutes * 60);
|
||||
let secondsDisplay: string = String(secondsNum);
|
||||
|
||||
if (secondsNum < 10) {
|
||||
//add a zero
|
||||
secondsDisplay = "0" + secondsNum;
|
||||
}
|
||||
|
||||
let formatted = minutes + ":" + secondsDisplay;
|
||||
|
||||
return formatted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this Firefox (web-extensions)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user