Skip to content

Commit

Permalink
Bumped version, fixed URL bug in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkelM committed Dec 2, 2023
1 parent f687fed commit e06caff
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## v3.0.0 (Unreleased)
## v3.0.0

<!--Releasenotes start-->
- Shorts pages are now supported! Shuffle buttons can now be found on all shorts pages.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "random-youtube-video",
"version": "2.3.0",
"version": "3.0.0",
"description": "Customize, shuffle and play random videos from any YouTube channel.",
"scripts": {
"dev": "concurrently \"npm run dev:chromium\" \"npm run dev:firefox\"",
Expand Down
3 changes: 2 additions & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ async function initExtension() {
if (configSync.previousVersion === null) {
console.log(`Extension was installed for the first time (v${manifestData.version})`);
await setSyncStorageValue("previousVersion", manifestData.version);
await chrome.tabs.create({ url: "html/welcome.html" });
const welcomeUrl = chrome.runtime.getURL("html/welcome.html");
await chrome.tabs.create({ url: welcomeUrl });
} else if (configSync.previousVersion < manifestData.version) {
await handleExtensionUpdate(manifestData, configSync.previousVersion);
}
Expand Down
9 changes: 5 additions & 4 deletions src/html/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,18 @@ async function setPopupDomElemenEventListeners(domElements) {

// Open options page button
domElements.openOptionsPageButton.addEventListener("click", async function () {
await chrome.tabs.create({ url: "html/popup.html" });
const optionsUrl = chrome.runtime.getURL("html/popup.html");
await chrome.tabs.create({ url: optionsUrl });
});

// View changelog button
domElements.viewChangelogButton.addEventListener("click", async function () {
await setSyncStorageValue("lastViewedChangelogVersion", chrome.runtime.getManifest().version);

const tabUrl = chrome.runtime.getURL("html/changelog.html");
let mustOpenTab = await tryFocusingTab(tabUrl);
const changelogUrl = chrome.runtime.getURL("html/changelog.html");
let mustOpenTab = await tryFocusingTab(changelogUrl);
if (mustOpenTab) {
await chrome.tabs.create({ url: "html/changelog.html" });
await chrome.tabs.create({ url: changelogUrl });
}
});
}
2 changes: 1 addition & 1 deletion static/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Random YouTube Video",
"description": "Customize, shuffle and play random videos from any YouTube channel.",
"version": "2.3.0",
"version": "3.0.0",
"manifest_version": 3,
"content_scripts": [
{
Expand Down

0 comments on commit e06caff

Please sign in to comment.