mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-11 09:30:46 +01:00
commit
f5a4ffabde
3 changed files with 6 additions and 6 deletions
8
SB.js
8
SB.js
|
@ -131,7 +131,7 @@ function migrateOldFormats() { // Convert sponsorTimes format
|
||||||
for (key in SB.localConfig) {
|
for (key in SB.localConfig) {
|
||||||
if (key.startsWith("sponsorTimes") && key !== "sponsorTimes" && key !== "sponsorTimesContributed") {
|
if (key.startsWith("sponsorTimes") && key !== "sponsorTimes" && key !== "sponsorTimesContributed") {
|
||||||
SB.config.sponsorTimes.set(key.substr(12), SB.config[key]);
|
SB.config.sponsorTimes.set(key.substr(12), SB.config[key]);
|
||||||
delete SB.config[key];
|
chrome.storage.sync.remove(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,11 +178,11 @@ function convertJSON() {
|
||||||
|
|
||||||
// Add defaults
|
// Add defaults
|
||||||
function addDefaults() {
|
function addDefaults() {
|
||||||
Object.keys(SB.defaults).forEach(key => {
|
for (const key in SB.defaults) {
|
||||||
if(!SB.localConfig.hasOwnProperty(key)) {
|
if(!SB.localConfig.hasOwnProperty(key)) {
|
||||||
SB.localConfig[key] = SB.defaults[key];
|
SB.localConfig[key] = SB.defaults[key];
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Sync config
|
// Sync config
|
||||||
|
|
|
@ -721,7 +721,7 @@ async function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) {
|
||||||
await wait(isSubmitButtonLoaded);
|
await wait(isSubmitButtonLoaded);
|
||||||
|
|
||||||
//if it isn't visible, there is no data
|
//if it isn't visible, there is no data
|
||||||
let shouldHide = (uploadButtonVisible && !SB.config.hideDeleteButtonPlayerControls) ? "unset" : "none"
|
let shouldHide = (uploadButtonVisible && !(SB.config.hideDeleteButtonPlayerControls || onInvidious)) ? "unset" : "none"
|
||||||
document.getElementById("deleteButton").style.display = shouldHide;
|
document.getElementById("deleteButton").style.display = shouldHide;
|
||||||
|
|
||||||
if (showStartSponsor) {
|
if (showStartSponsor) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "__MSG_Name__",
|
"short_name": "__MSG_Name__",
|
||||||
"version": "1.2.3",
|
"version": "1.2.4",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_Description__",
|
"description": "__MSG_Description__",
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
|
|
Loading…
Reference in a new issue