Merge pull request #134 from meowarex/dev

Patch out _hasCues_
This commit is contained in:
meoware.exe
2026-08-04 05:40:07 +10:00
committed by GitHub
2 changed files with 33 additions and 3 deletions
+18 -3
View File
@@ -2050,6 +2050,19 @@ let syncButtonListener: (() => void) | null = null;
let syncButtonEl: HTMLElement | null = null; let syncButtonEl: HTMLElement | null = null;
let syncButtonObserverUnload: (() => void) | null = null; let syncButtonObserverUnload: (() => void) | null = null;
/* Stops tidal from thinking RL line changes are User Scrolls (Hides sync button manually until user scrolls) */
const applyScrollOwnerState = (): void => {
document.body.classList.toggle(
"rl-owns-lyric-scroll",
isActive && scrollSynced,
);
};
const setScrollSynced = (value: boolean): void => {
scrollSynced = value;
applyScrollOwnerState();
};
// scroll bounce animation state // scroll bounce animation state
let scrollAnimIsAnimating = false; let scrollAnimIsAnimating = false;
let scrollAnimPending: { let scrollAnimPending: {
@@ -3518,9 +3531,10 @@ const teardown = (): void => {
clearLineSlideTimers(); clearLineSlideTimers();
clearSyntheticNativeLyrics(); clearSyntheticNativeLyrics();
restoreTidalLyrics(); restoreTidalLyrics();
applyScrollOwnerState();
}; };
// find scrollable parent — walk up but never past the now-playing boundary // find scrollable parent
// to avoid scrolling a shared ancestor that would shift the play queue // to avoid scrolling a shared ancestor that would shift the play queue
const findScroller = (el: HTMLElement): HTMLElement => { const findScroller = (el: HTMLElement): HTMLElement => {
const lyricsPanel = el.closest( const lyricsPanel = el.closest(
@@ -3630,7 +3644,7 @@ const scrollToActiveLine = (): void => {
// Resync lyric scroll (scrubbing and lyric jumps) // Resync lyric scroll (scrubbing and lyric jumps)
const resync = (syncNativeButton = true): void => { const resync = (syncNativeButton = true): void => {
scrollSynced = true; setScrollSynced(true);
applyInactiveBlurState(primaryLineIdx, activeLineIdxs.size === 0, activeLineIdxs); applyInactiveBlurState(primaryLineIdx, activeLineIdxs.size === 0, activeLineIdxs);
scrollToActiveLine(); scrollToActiveLine();
const nativeSyncButton = syncButtonEl; const nativeSyncButton = syncButtonEl;
@@ -3646,7 +3660,7 @@ const hookUserScroll = (parent: HTMLElement): void => {
unhookUserScroll(); unhookUserScroll();
const onUserScroll = () => { const onUserScroll = () => {
if (!scrollSynced) return; if (!scrollSynced) return;
scrollSynced = false; setScrollSynced(false);
clearScrollAnim(); clearScrollAnim();
if (settings.blurInactive) { if (settings.blurInactive) {
clearInactiveBlurState(); clearInactiveBlurState();
@@ -3711,6 +3725,7 @@ const unhookSyncButton = (): void => {
// Tick Loop: determine active line and word // Tick Loop: determine active line and word
const startTickLoop = (): void => { const startTickLoop = (): void => {
clearTickLoop(); clearTickLoop();
applyScrollOwnerState();
sylLog("[RL-Syllable] Tick loop started"); sylLog("[RL-Syllable] Tick loop started");
@@ -553,11 +553,26 @@ body.rl-integrated-seekbar [data-test="footer-player"] [class*="playerContent"]
/* biome-ignore lint: Must beat Tidal _hasCues_ opacity */ /* biome-ignore lint: Must beat Tidal _hasCues_ opacity */
opacity: 1 !important; opacity: 1 !important;
line-height: 1.15; line-height: 1.15;
}
/* Switch from !important to specify classes (fixes _hasCues_) */
.rl-wbw-container .rl-wbw-word,
.rl-wbw-active [data-test="lyrics-intro"] {
transform: none;
filter: none;
}
.rl-wbw-container .rl-wbw-word {
transition: transition:
text-shadow 0.15s ease-out, text-shadow 0.15s ease-out,
color 0.15s ease-out; color 0.15s ease-out;
} }
/* Hides sync button untilt he user aactually scrolls (Stops tidal from thinking RL line changes are user scroll) */
body.rl-owns-lyric-scroll [class*="_syncButtonContainer_"] {
display: none !important;
}
/* Hover word (Grouped Syllables) */ /* Hover word (Grouped Syllables) */
.rl-wbw-line:not(.rl-wbw-line-active) > .rl-wbw-word:hover, .rl-wbw-line:not(.rl-wbw-line-active) > .rl-wbw-word:hover,
.rl-wbw-line:not(.rl-wbw-line-active) > .rl-wbw-word.rl-wbw-word-hover, .rl-wbw-line:not(.rl-wbw-line-active) > .rl-wbw-word.rl-wbw-word-hover,