Merge pull request #6 from meowarex/dev

Fixed Debug Errors in Prod
This commit is contained in:
Meow Meow
2025-06-01 01:22:32 +10:00
committed by GitHub
+19 -19
View File
@@ -169,28 +169,28 @@ const toggleCleanView = function(): void {
} else { } else {
appliedStyle = ApplyCSS(styles); appliedStyle = ApplyCSS(styles);
// Debug: Log bottom-left buttons to help identify selectors // Debug: Log bottom-left buttons to help identify selectors
debugBottomLeftButtons(); //debugBottomLeftButtons();
} }
isCleanView = !isCleanView; isCleanView = !isCleanView;
updateButtonStates(); updateButtonStates();
}; };
const debugBottomLeftButtons = function(): void { // const debugBottomLeftButtons = function(): void {
setTimeout(() => { // setTimeout(() => {
const nowPlayingContainer = document.querySelector('[class*="_nowPlayingContainer"]'); // const nowPlayingContainer = document.querySelector('[class*="_nowPlayingContainer"]');
if (nowPlayingContainer) { // if (nowPlayingContainer) {
const buttons = nowPlayingContainer.querySelectorAll('button'); // const buttons = nowPlayingContainer.querySelectorAll('button');
trace.msg.log(`Found ${buttons.length} buttons in now playing container:`); // //trace.msg.log(`Found ${buttons.length} buttons in now playing container:`);
buttons.forEach((button, index) => { // buttons.forEach((button, index) => {
const classes = button.className; // const classes = button.className;
const dataTest = button.getAttribute('data-test'); // const dataTest = button.getAttribute('data-test');
const title = button.getAttribute('title'); // const title = button.getAttribute('title');
const ariaLabel = button.getAttribute('aria-label'); // const ariaLabel = button.getAttribute('aria-label');
trace.msg.log(`Button ${index}: classes="${classes}", data-test="${dataTest}", title="${title}", aria-label="${ariaLabel}"`); // //trace.msg.log(`Button ${index}: classes="${classes}", data-test="${dataTest}", title="${title}", aria-label="${ariaLabel}"`);
}); // });
} // }
}, 1000); // }, 1000);
}; // };
const createHideUIButton = function(): void { const createHideUIButton = function(): void {
setTimeout(() => { setTimeout(() => {
@@ -247,7 +247,7 @@ const createHideUIButton = function(): void {
// Insert after the fullscreen button // Insert after the fullscreen button
buttonContainer.insertBefore(hideUIButton, fullscreenButton.nextSibling); buttonContainer.insertBefore(hideUIButton, fullscreenButton.nextSibling);
trace.msg.log("Hide UI button added next to fullscreen button"); //trace.msg.log("Hide UI button added next to fullscreen button");
updateButtonStates(); updateButtonStates();
}, 1000); }, 1000);
}; };
@@ -305,7 +305,7 @@ const createUnhideUIButton = function(): void {
// Append to body instead of a specific container // Append to body instead of a specific container
document.body.appendChild(unhideUIButton); document.body.appendChild(unhideUIButton);
trace.msg.log("Unhide UI button added to bottom-left above player bar"); //trace.msg.log("Unhide UI button added to bottom-left above player bar");
updateButtonStates(); updateButtonStates();
}, 1500); // Slight delay after hide button }, 1500); // Slight delay after hide button
}; };