Merge pull request #55 from ajayyy/experimental

Fixed save button being in the wrong place and made submit button hidden on editing
This commit is contained in:
Ajay Ramachandran 2019-07-30 21:08:58 -04:00 committed by GitHub
commit 9462886539
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{
"name": "SponsorBlock for YouTube - Skip Sponsorships",
"short_name": "SponsorBlock",
"version": "1.0.21",
"version": "1.0.22",
"description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.",
"content_scripts": [
{

View file

@ -451,6 +451,9 @@ function runThePopup() {
//already open
return;
}
//hide submit button
document.getElementById("submitTimesContainer").style.display = "none";
let sponsorTimeContainer = document.getElementById("sponsorTimeContainer" + index);
@ -512,8 +515,7 @@ function runThePopup() {
let editButton = document.getElementById("sponsorTimeEditButton" + index);
let sponsorTimesContainer = document.getElementById("sponsorTimesContainer");
editButton.remove();
sponsorTimesContainer.appendChild(saveButton);
sponsorTimesContainer.replaceChild(saveButton, editButton);
}
function saveSponsorTimeEdit(index) {
@ -531,6 +533,8 @@ function runThePopup() {
chrome.storage.sync.set({[sponsorTimeKey]: sponsorTimes});
displaySponsorTimes();
showSubmitTimesIfNecessary();
}
//deletes the sponsor time submitted at an index