From c90e32aafcd23bd646cbf2894ad6f4488006e9d1 Mon Sep 17 00:00:00 2001 From: ktg5 <42522603+ktg5@users.noreply.github.com> Date: Fri, 3 Nov 2023 16:02:16 -0700 Subject: [PATCH] possibly fixed update page not showing? --- .github/ISSUE_TEMPLATE/bug-report.md | 1 + background.js | 27 +++++++++++-------------- html/base.js | 5 +++++ html/install.html | 4 ++++ html/popup.js | 6 +++--- html/{release-note.html => update.html} | 27 ++++++++++++++++++------- setup.js | 4 +--- 7 files changed, 46 insertions(+), 28 deletions(-) rename html/{release-note.html => update.html} (86%) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index bf0ebb4..22a0e7b 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -9,6 +9,7 @@ assignees: '' **Describe the bug** A clear and concise description of what the bug is. +Make sure that you've also tested the same issue with disabling any extra extensions that may effect YouTube. **Screenshots** If applicable, add screenshots to help explain your problem. diff --git a/background.js b/background.js index 876b6c4..9349e07 100644 --- a/background.js +++ b/background.js @@ -3,22 +3,19 @@ var storage = browser.storage.sync; var extension = browser.extension; var runtime = browser.runtime; -function handleInstalled(reason) { +// On extension update +runtime.onInstalled.addListener(reason => { storage.get(['PTConfig'], function(result) { - if (Object.keys(result).length > 0 && !result.PTConfig.releaseNote) { - return; - } else if (reason == "update") { - browser.tabs.create({ - url: `./html/release-note.html` - }); - } else { - browser.tabs.create({ - url: `./html/${reason}.html` - }); + var userConfig = result.PTConfig; + // Check to see if user would like to get release notes + if (userConfig.showReleaseNotes !== false) { + // Check if previous version is not equal to current version + if (reason.previousVersion !== runtime.getManifest().version) { + // Create tab lol + browser.tabs.create({ + url: `./html/${reason.reason}.html` + }); + } } }); -} - -runtime.onInstalled.addListener(reason => { - handleInstalled(reason.reason); }); \ No newline at end of file diff --git a/html/base.js b/html/base.js index 3016f35..1daa307 100644 --- a/html/base.js +++ b/html/base.js @@ -11,6 +11,11 @@ var runtime = browser.runtime; var version = runtime.getManifest().version; setTimeout(() => { + // Add version number to page title + var pageName = document.getElementById('page-name').innerHTML; + document.title = `PlayerTube v${version} : ${pageName}`; + + // Add version number to document var slides = document.getElementsByClassName("showVersion"); for (var i = 0; i < slides.length; i++) { slides.item(i).innerHTML += "v" + version; diff --git a/html/install.html b/html/install.html index 31a8152..ca6b82e 100644 --- a/html/install.html +++ b/html/install.html @@ -2,6 +2,10 @@ + PlayerTube : Welcome! + + + diff --git a/html/popup.js b/html/popup.js index c5a0274..5cad115 100644 --- a/html/popup.js +++ b/html/popup.js @@ -9,11 +9,9 @@ var runtime = browser.runtime; // Default config var def_pt_config = { - // First-time ppl & release note checking. - releaseNote: 0, - // Basic settings. year: '2015', + showReleaseNotes: true, darkMode: false, fullyExtendBar: false, toggleFadeOut: false, @@ -289,6 +287,8 @@ async function start(userConfig) { ${makeMenuOption(`selection`, `year`, `Change year of Player`, yearOptions)} + ${makeMenuOption('toggle', 'showReleaseNotes', 'Toggle Release Notes when reloading or updating PlayerTube')} + ${makeMenuOption('toggle', 'toggleRoundedCorners', 'Toggle rounded corners around a YouTube video')} diff --git a/html/release-note.html b/html/update.html similarity index 86% rename from html/release-note.html rename to html/update.html index 9af9e9c..fa31c4c 100644 --- a/html/release-note.html +++ b/html/update.html @@ -2,6 +2,10 @@ + PlayerTube : Update Log + + + @@ -18,20 +22,29 @@

Important notice for those running CustomTube!

If by any chance you encounter issues when it comes to the look and feel of the YouTube player with PlayerTube & CustomTube enabled, - please make sure to set "Use current player" in the "Watch Page" - tab in the CustomTube settings. + + please make sure to set "Use current player" in the "Watch Page" + tab in the CustomTube settings. +

Go to the 'Watch Page' tab in CustomTube's settings, scroll down to 'Video Player Style' and set it to 'Use current player'. +

+ This alert will be removed sometime soon but will be accessable to + new users. +

+ +

PlayerTube has been updated to

  • 2010 now does not fully extend the progress bar by default. This can be re-enabled by using one of the new settings under, "Fully extend the Progress Bar's height at all times"
  • +
  • Possibly fixed extension pages to actually show?
  • In the extension popup, some opinions have links to information about what the setting will target.
  • Fixed some link & embed issues with 2012 & 2015
  • Improved on 2010's top buttons
  • -
  • Added the ability to toggle the Paid Content popups on videos
  • -
  • Added the ability to toggle Info Cards
  • -
  • Added the ability to fully extend the progress bar
  • -
  • Added the ability to toggle the fade in & out animation instead of moving the controls down
  • -
  • (This was added in 1.4 but) When a feature is not in someone's config, the toggle button will flash orange.
  • +
  • Added the ability to toggle the Paid Content popups on videos (Disabled by default)
  • +
  • Added the ability to toggle Info Cards (Enabled by default)
  • +
  • Added the ability to fully extend the progress bar (Disabled by default)
  • +
  • Added the ability to toggle the fade in & out animation instead of moving the controls down (Disabled by default)
  • +
  • (This was added in 1.4 but) When a feature is not in the user's config, the toggle button will flash orange.

  • diff --git a/setup.js b/setup.js index 24acb62..21372b7 100644 --- a/setup.js +++ b/setup.js @@ -6,11 +6,9 @@ var runtime = browser.runtime; // Default config var def_pt_config = { - // First-time ppl & release note checking. - releaseNote: 0, - // Basic settings. year: '2015', + showReleaseNotes: true, darkMode: false, autoplayButton: false, heatMapToggle: false,