Skip to content

Commit

Permalink
Moved API quota info to advanced settings
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkelM committed Oct 9, 2024
1 parent eeb8f0b commit 49eb111
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Changelog

## v3.1.10
## v3.1.11

<!--Releasenotes start-->
- News page will no longer open after updating from v3.1.5 or an earlier version.
- Changed the default settings to not open shuffled videos in a new tab.
- Moved the informative text about remaining YouTube API quota to the advanced settings menu.
- Updated the welcome page for a better experience.
<!--Releasenotes end-->

## v3.1.10

- News page will no longer open after updating from v3.1.5 or an earlier version.

## v3.1.9

- Temporarily disabled the news feature.
Expand Down
11 changes: 6 additions & 5 deletions src/html/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ try {
// --- Private ---
// Get relevant DOM elements
function getPopupDomElements() {
/* global reviewDonationDiv, reviewDiv, donationDiv, customApiKeyInputDiv, customApiKeyInputInfoDiv, shuffleNumVideosInPlaylistDiv, channelCustomOptionsDiv, channelCustomOptionsDropdownDiv, forYourInformationDiv, dailyQuotaNoticeDiv */
/* global reviewDonationDiv, reviewDiv, donationDiv, customApiKeyInputDiv, customApiKeyInputInfoDiv, shuffleNumVideosInPlaylistDiv, channelCustomOptionsDiv, channelCustomOptionsDropdownDiv, forYourInformationDiv, advancedSettingsDiv, dailyQuotaNoticeDiv */
/* eslint no-undef: "error" */
return {
body: document.body,
Expand Down Expand Up @@ -121,15 +121,16 @@ function getPopupDomElements() {
// Database sharing: Option toggle
dbSharingOptionToggle: document.getElementById("dbSharingOptionToggle"),

// Daily quota notice div
dailyQuotaNoticeDiv: advancedSettingsDiv.children.namedItem("dailyQuotaNoticeDiv"),
// Daily quota notice: Text
dailyQuotaNoticeText: dailyQuotaNoticeDiv.children.namedItem("dailyQuotaNoticeText"),

// FYI - FOR YOUR INFORMATION
// FYI div
forYourInformationDiv: document.getElementById("forYourInformationDiv"),
// FYI: Number of shuffled videos text
numberOfShuffledVideosText: forYourInformationDiv.children.namedItem("numberOfShuffledVideosText"),
// FYI: Daily quota notice div
dailyQuotaNoticeDiv: forYourInformationDiv.children.namedItem("dailyQuotaNoticeDiv"),
// Daily quota notice: Text
dailyQuotaNoticeText: dailyQuotaNoticeDiv.children.namedItem("dailyQuotaNoticeText"),

// FOOTER
// View changelog button
Expand Down
13 changes: 7 additions & 6 deletions static/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,7 @@ <h3 id="channelCustomOptionsHeader">Channel settings</h3>
<br />
<button class="randomYoutubeVideoButton" id="customApiKeySubmitButton" type="button">Submit</button>
</div>
</div>
<!-- OPTIONS END -->

<!-- FYI -->
<div id="forYourInformationDiv">
<!-- Number of shuffled videos -->
<p id="numberOfShuffledVideosText" style="margin-bottom: 6px; margin-top: 6px">You have shuffled 0 times until now.</p>
<!-- Daily quota notice -->
<div
id="dailyQuotaNoticeDiv"
Expand All @@ -218,6 +212,13 @@ <h3 id="channelCustomOptionsHeader">Channel settings</h3>
</div>
<!-- Daily quota notice end -->
</div>
<!-- OPTIONS END -->

<!-- FYI -->
<div id="forYourInformationDiv">
<!-- Number of shuffled videos -->
<p id="numberOfShuffledVideosText" style="margin-bottom: 6px; margin-top: 6px">You have shuffled 0 times until now.</p>
</div>
<!-- FYI end -->

<footer id="randomYoutubeVideoFooter">
Expand Down

0 comments on commit 49eb111

Please sign in to comment.