Skip to content

Commit

Permalink
Merge pull request #234 from ajayyy/hotfix-invidious
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
ajayyy authored Jan 11, 2020
2 parents 63568aa + 115b1ed commit f5a4ffa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions SB.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function migrateOldFormats() { // Convert sponsorTimes format
for (key in SB.localConfig) {
if (key.startsWith("sponsorTimes") && key !== "sponsorTimes" && key !== "sponsorTimesContributed") {
SB.config.sponsorTimes.set(key.substr(12), SB.config[key]);
delete SB.config[key];
chrome.storage.sync.remove(key);
}
}
}
Expand Down Expand Up @@ -178,11 +178,11 @@ function convertJSON() {

// Add defaults
function addDefaults() {
Object.keys(SB.defaults).forEach(key => {
if(!SB.localConfig.hasOwnProperty(key)) {
for (const key in SB.defaults) {
if(!SB.localConfig.hasOwnProperty(key)) {
SB.localConfig[key] = SB.defaults[key];
}
});
}
};

// Sync config
Expand Down
2 changes: 1 addition & 1 deletion content.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ async function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) {
await wait(isSubmitButtonLoaded);

//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;

if (showStartSponsor) {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "__MSG_Name__",
"version": "1.2.3",
"version": "1.2.4",
"default_locale": "en",
"description": "__MSG_Description__",
"content_scripts": [
Expand Down

0 comments on commit f5a4ffa

Please sign in to comment.