mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-17 03:44:25 +03:00
Fixed save button being in the wrong place and made submit button hide on editing.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "SponsorBlock for YouTube - Skip Sponsorships",
|
"name": "SponsorBlock for YouTube - Skip Sponsorships",
|
||||||
"short_name": "SponsorBlock",
|
"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.",
|
"description": "Skip over sponsorship on YouTube videos. Report sponsors on videos you watch to save the time of others.",
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
|
|||||||
8
popup.js
8
popup.js
@@ -452,6 +452,9 @@ function runThePopup() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//hide submit button
|
||||||
|
document.getElementById("submitTimesContainer").style.display = "none";
|
||||||
|
|
||||||
let sponsorTimeContainer = document.getElementById("sponsorTimeContainer" + index);
|
let sponsorTimeContainer = document.getElementById("sponsorTimeContainer" + index);
|
||||||
|
|
||||||
//get sponsor time minutes and seconds boxes
|
//get sponsor time minutes and seconds boxes
|
||||||
@@ -512,8 +515,7 @@ function runThePopup() {
|
|||||||
let editButton = document.getElementById("sponsorTimeEditButton" + index);
|
let editButton = document.getElementById("sponsorTimeEditButton" + index);
|
||||||
let sponsorTimesContainer = document.getElementById("sponsorTimesContainer");
|
let sponsorTimesContainer = document.getElementById("sponsorTimesContainer");
|
||||||
|
|
||||||
editButton.remove();
|
sponsorTimesContainer.replaceChild(saveButton, editButton);
|
||||||
sponsorTimesContainer.appendChild(saveButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveSponsorTimeEdit(index) {
|
function saveSponsorTimeEdit(index) {
|
||||||
@@ -531,6 +533,8 @@ function runThePopup() {
|
|||||||
chrome.storage.sync.set({[sponsorTimeKey]: sponsorTimes});
|
chrome.storage.sync.set({[sponsorTimeKey]: sponsorTimes});
|
||||||
|
|
||||||
displaySponsorTimes();
|
displaySponsorTimes();
|
||||||
|
|
||||||
|
showSubmitTimesIfNecessary();
|
||||||
}
|
}
|
||||||
|
|
||||||
//deletes the sponsor time submitted at an index
|
//deletes the sponsor time submitted at an index
|
||||||
|
|||||||
Reference in New Issue
Block a user