mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Made preview also save the edit.
This commit is contained in:
parent
3f815a18c4
commit
ac118173a5
1 changed files with 8 additions and 3 deletions
11
popup.js
11
popup.js
|
@ -522,6 +522,9 @@ function runThePopup() {
|
|||
//edit is currently open, use that time
|
||||
|
||||
skipTime = getSponsorTimeEditTimes("startTime", index);
|
||||
|
||||
//save the edit
|
||||
saveSponsorTimeEdit(index, false);
|
||||
}
|
||||
|
||||
chrome.tabs.query({
|
||||
|
@ -618,7 +621,7 @@ function runThePopup() {
|
|||
return parseInt(minutes.value) * 60 + parseFloat(seconds.value);
|
||||
}
|
||||
|
||||
function saveSponsorTimeEdit(index) {
|
||||
function saveSponsorTimeEdit(index, closeEditMode = true) {
|
||||
sponsorTimes[index][0] = getSponsorTimeEditTimes("startTime", index);
|
||||
sponsorTimes[index][1] = getSponsorTimeEditTimes("endTime", index);
|
||||
|
||||
|
@ -636,9 +639,11 @@ function runThePopup() {
|
|||
});
|
||||
});
|
||||
|
||||
displaySponsorTimes();
|
||||
if (closeEditMode) {
|
||||
displaySponsorTimes();
|
||||
|
||||
showSubmitTimesIfNecessary();
|
||||
showSubmitTimesIfNecessary();
|
||||
}
|
||||
}
|
||||
|
||||
//deletes the sponsor time submitted at an index
|
||||
|
|
Loading…
Reference in a new issue