Skip to content

Removed advanced settings scrolling animation on Firefox #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "3.1.13",
"version": "3.1.13.1",
"description": "Customize, shuffle and play random videos from any YouTube channel.",
"scripts": {
"dev": "concurrently \"npm run dev:chromium\" \"npm run dev:firefox\"",
Expand Down
24 changes: 14 additions & 10 deletions src/html/htmlUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Shared utility functions for the various HTML pages' logic
import { shufflingHints } from "../config.js";
import { isFirefox, shufflingHints } from "../config.js";

// ----- Shuffling Hints -----
export async function buildShufflingHints(domElements) {
Expand Down Expand Up @@ -54,17 +54,21 @@ export function animateSlideOut(targetElement, shouldSlideOut = null) {
}
}

requestAnimationFrame(scrollStep);
if (!isFirefox) {
requestAnimationFrame(scrollStep);
}
}, 0);

targetElement.addEventListener(
"transitionend",
function () {
// Ensure the page is scrolled to the bottom after the animation
window.scrollTo(0, document.body.scrollHeight);
}, {
once: true
});
if (!isFirefox) {
targetElement.addEventListener(
"transitionend",
function () {
// Ensure the page is scrolled to the bottom after the animation
window.scrollTo(0, document.body.scrollHeight);
}, {
once: true
});
}
} else {
// Sliding in
const oldHeight = targetElement.clientHeight;
Expand Down
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": "3.1.13",
"version": "3.1.13.1",
"version_name": "3.1.13",
"manifest_version": 3,
"content_scripts": [
Expand Down