mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Fix editing not adding numbers.
Resolves https://github.com/ajayyy/SponsorBlock/issues/273.
This commit is contained in:
parent
852912a42b
commit
d2779aba86
1 changed files with 16 additions and 15 deletions
|
@ -667,11 +667,11 @@ async function runThePopup(messageListener?: MessageListener) {
|
||||||
|
|
||||||
//id start name is whether it is the startTime or endTime
|
//id start name is whether it is the startTime or endTime
|
||||||
//gives back the time in seconds
|
//gives back the time in seconds
|
||||||
function getSponsorTimeEditTimes(idStartName, index) {
|
function getSponsorTimeEditTimes(idStartName, index): number {
|
||||||
let minutes = <HTMLInputElement> <unknown> document.getElementById(idStartName + "Minutes" + index);
|
let minutes = <HTMLInputElement> <unknown> document.getElementById(idStartName + "Minutes" + index);
|
||||||
let seconds = <HTMLInputElement> <unknown> document.getElementById(idStartName + "Seconds" + index);
|
let seconds = <HTMLInputElement> <unknown> document.getElementById(idStartName + "Seconds" + index);
|
||||||
|
|
||||||
return parseInt(minutes.value) * 60 + seconds.value;
|
return parseInt(minutes.value) * 60 + parseInt(seconds.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveSponsorTimeEdit(index, closeEditMode = true) {
|
function saveSponsorTimeEdit(index, closeEditMode = true) {
|
||||||
|
@ -680,6 +680,7 @@ async function runThePopup(messageListener?: MessageListener) {
|
||||||
|
|
||||||
//save this
|
//save this
|
||||||
Config.config.sponsorTimes.set(currentVideoID, sponsorTimes);
|
Config.config.sponsorTimes.set(currentVideoID, sponsorTimes);
|
||||||
|
|
||||||
messageHandler.query({
|
messageHandler.query({
|
||||||
active: true,
|
active: true,
|
||||||
currentWindow: true
|
currentWindow: true
|
||||||
|
|
Loading…
Reference in a new issue