Skip to content

Commit

Permalink
Hotfixed API error (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkelM authored Feb 24, 2023
1 parent 3a9a99b commit 68b8844
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Changelog

## v1.2.0
## v1.2.1

<!--Releasenotes start-->
- You are now able to set the percentage of videos that are shuffled for each individual channel instead of one global value. Simply visit a channel or video page and open the extension popup.
- Fixed an issue with the API
<!--Releasenotes end-->

## v1.2.0

- You are now able to set the percentage of videos that are shuffled for each individual channel instead of one global value. Simply visit a channel or video page and open the extension popup.

## v1.1.2

- Removed unnecessary logging.
Expand Down
7 changes: 7 additions & 0 deletions extension/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ async function handleExtensionFirstInstall(manifestData) {
async function handleExtensionUpdate(manifestData) {
console.log(`Extension was updated to version v${manifestData.version}`);

// Only for the 1.2.1 update
// Delete the youtubeAPIKey from local storage if it exists
const localStorageContents = await chrome.storage.local.get();
if (localStorageContents["youtubeAPIKey"]) {
await chrome.storage.local.remove("youtubeAPIKey");
}

// This variable indicates if the local storage should be cleared when updating to the newest version
// Should only be true if changes were made to the data structure, requiring users to get the new data format from the database
// Provide reason for clearing if applicable
Expand Down
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Random YouTube Video",
"description": "Play a random video uploaded on the current YouTube channel.",
"version": "1.2.0",
"version": "1.2.1",
"icons": {
"16": "images/icon-16-red.png",
"32": "images/icon-32-red.png",
Expand Down

0 comments on commit 68b8844

Please sign in to comment.