From adb724a846d6bcc85da370ee1eb00d29f2b4b94b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 01:37:48 +0000 Subject: [PATCH 1/2] build(deps): bump i18next from 24.0.2 to 24.2.0 Bumps [i18next](https://github.com/i18next/i18next) from 24.0.2 to 24.2.0. - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v24.0.2...v24.2.0) --- updated-dependencies: - dependency-name: i18next dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b15f055..5c967b29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5711,9 +5711,9 @@ } }, "node_modules/i18next": { - "version": "24.0.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.0.2.tgz", - "integrity": "sha512-D88xyIGcWAKwBTAs4RSqASi8NXR/NhCVSTM4LDbdoU8qb/5dcEZjNCLDhtQBB7Epw/Cp1w2vH/3ujoTbqLSs5g==", + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.2.0.tgz", + "integrity": "sha512-ArJJTS1lV6lgKH7yEf4EpgNZ7+THl7bsGxxougPYiXRTJ/Fe1j08/TBpV9QsXCIYVfdE/HWG/xLezJ5DOlfBOA==", "funding": [ { "type": "individual", @@ -5728,7 +5728,6 @@ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" } ], - "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.2" }, From b6e2039539e40be1070e2bea978dba952cefa1da Mon Sep 17 00:00:00 2001 From: livingflore <63370734+livingflore@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:43:45 +0500 Subject: [PATCH 2/2] fix: #745 --- src/features/playbackSpeedButtons/index.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/features/playbackSpeedButtons/index.ts b/src/features/playbackSpeedButtons/index.ts index a116ba28..133603ac 100644 --- a/src/features/playbackSpeedButtons/index.ts +++ b/src/features/playbackSpeedButtons/index.ts @@ -5,7 +5,7 @@ import { getFeatureIcon } from "@/src/icons"; import { type YouTubePlayerDiv, youtubePlayerMinSpeed } from "@/src/types"; import eventManager from "@/src/utils/EventManager"; import OnScreenDisplayManager from "@/src/utils/OnScreenDisplayManager"; -import { createTooltip, isWatchPage, round, waitForSpecificMessage } from "@/src/utils/utilities"; +import { createTooltip, isWatchPage, isLivePage, round, waitForSpecificMessage } from "@/src/utils/utilities"; import type { AddButtonFunction, RemoveButtonFunction } from "../index"; let currentPlaybackSpeed = 1; @@ -131,11 +131,10 @@ export const addIncreasePlaybackSpeedButton: AddButtonFunction = async () => { } } = await waitForSpecificMessage("options", "request_data", "content"); if (!enable_playback_speed_buttons) return; - if (!isWatchPage()) return; const videoElement = document.querySelector("video"); if (!videoElement) return; ({ playbackRate: currentPlaybackSpeed } = videoElement); - const playerContainer = document.querySelector("div#movie_player"); + const playerContainer = isWatchPage() || isLivePage() ? document.querySelector("div#movie_player") : null; if (!playerContainer) return; const playerVideoData = await playerContainer.getVideoData(); if (playerVideoData.isLive && checkIfFeatureButtonExists("increasePlaybackSpeedButton", increasePlaybackSpeedButtonPlacement)) { @@ -171,12 +170,11 @@ export const addDecreasePlaybackSpeedButton: AddButtonFunction = async () => { } } = await waitForSpecificMessage("options", "request_data", "content"); if (!enable_playback_speed_buttons) return; - if (!isWatchPage()) return; const videoElement = document.querySelector("video"); if (!videoElement) return; const minSpeed = getMinSpeed(playbackSpeedPerClick); ({ playbackRate: currentPlaybackSpeed } = videoElement); - const playerContainer = document.querySelector("div#movie_player"); + const playerContainer = isWatchPage() || isLivePage() ? document.querySelector("div#movie_player") : null; if (!playerContainer) return; const playerVideoData = await playerContainer.getVideoData(); if (playerVideoData.isLive && checkIfFeatureButtonExists("decreasePlaybackSpeedButton", decreasePlaybackSpeedButtonPlacement)) {