Skip to content

Commit

Permalink
Updated settings heading, fixed animateSlideOut (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkelM authored May 29, 2024
1 parent e79e360 commit 640c4d8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Changelog

## v3.1.3
## v3.1.4-beta

<!--Releasenotes start-->
- Fixed an animation in the popup.
<!--Releasenotes end-->

## v3.1.3

- When ignoring or only shuffling from shorts, the button will now more accurately display how long the shuffle will take.
- Cleaned up the popup and moved some settings to a separate menu.
- Fixed a bug where fixing a rare database corruption issue would reduce the user's daily API quota.
<!--Releasenotes end-->

## v3.1.2

Expand Down
8 changes: 6 additions & 2 deletions src/html/htmlUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ async function displayShufflingHint(displayElement, currentHintIndex = null) {
}

// ----- Animations -----
export function animateSlideOut(targetElement) {
export function animateSlideOut(targetElement, shouldSlideOut = null) {
if (shouldSlideOut) {
targetElement.classList.remove("active");
}

// Sliding out
if (!targetElement.classList.contains("active")) {
if (!targetElement.classList.contains("active") && (shouldSlideOut == null || shouldSlideOut)) {
targetElement.classList.add("active");
targetElement.style.height = "auto";

Expand Down
3 changes: 2 additions & 1 deletion src/html/popup/popupUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ export async function manageDependents(domElements, parent, value) {
domElements.customApiKeyInputField.value = configSync.customYoutubeApiKey ? configSync.customYoutubeApiKey : "";

manageDbOptOutOption(domElements);
animateSlideOut(domElements.customApiKeyInputDiv, true);
} else {
// The user must share data with the database
domElements.dbSharingOptionToggle.checked = true;
configSync.databaseSharingEnabledOption = true;
await setSyncStorageValue("databaseSharingEnabledOption", true);

manageDbOptOutOption(domElements);
animateSlideOut(domElements.customApiKeyInputDiv, false);
}
animateSlideOut(domElements.customApiKeyInputDiv);
updateFYIDiv(domElements);
break;

Expand Down
5 changes: 2 additions & 3 deletions static/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ <h3>Permissions needed!</h3>
</div>

<!-- OPTIONS START -->
<!-- <h2>Extension Settings</h2> -->
<p class="grey-text">Hover over an option to view a more detailed explanation.</p>
<p class="grey-text">Hover over an option to view a detailed explanation.</p>

<h3>General Video Settings</h3>
<h3>Shuffle Settings</h3>
<!-- First row of options -->
<div class="optionsRow">
<!-- Shuffling: Open in new tab option toggle -->
Expand Down
2 changes: 1 addition & 1 deletion static/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Random YouTube Video",
"description": "Customize, shuffle and play random videos from any YouTube channel.",
"version": "3.1.3",
"version_name": "3.1.3",
"version_name": "3.1.4-beta",
"manifest_version": 3,
"content_scripts": [
{
Expand Down

0 comments on commit 640c4d8

Please sign in to comment.