Skip to content

Commit

Permalink
Merge pull request #55 from ajayyy/experimental
Browse files Browse the repository at this point in the history
Fixed save button being in the wrong place and made submit button hidden on editing
  • Loading branch information
ajayyy authored Jul 31, 2019
2 parents e3aeb0c + 85518d8 commit 9462886
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand Down
8 changes: 6 additions & 2 deletions popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ function runThePopup() {
//already open
return;
}

//hide submit button
document.getElementById("submitTimesContainer").style.display = "none";

let sponsorTimeContainer = document.getElementById("sponsorTimeContainer" + index);

Expand Down Expand Up @@ -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) {
Expand All @@ -531,6 +533,8 @@ function runThePopup() {
chrome.storage.sync.set({[sponsorTimeKey]: sponsorTimes});

displaySponsorTimes();

showSubmitTimesIfNecessary();
}

//deletes the sponsor time submitted at an index
Expand Down

0 comments on commit 9462886

Please sign in to comment.