Skip to content

Commit

Permalink
fix UI issues including transparency
Browse files Browse the repository at this point in the history
Based on the following commit:
reisxd/TizenTube@8800d1f

Co-authored-by: reisxd <[email protected]>
  • Loading branch information
throwaway96 and reisxd committed Mar 29, 2024
1 parent cdd89de commit 60536ac
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,34 @@ export function showNotification(text, time = 3000) {
setTimeout(() => {
showNotification('Press [GREEN] to open YTAF configuration screen');
}, 2000);

function applyUIFixes() {
try {
const bodyClasses = document.body.classList;

const observer = new MutationObserver(function bodyClassCallback(
_records,
_observer
) {
try {
if (bodyClasses.contains('app-quality-root')) {
bodyClasses.remove('app-quality-root');
}
} catch (e) {
console.error('error in <body> class observer callback:', e);
}
});

observer.observe(document.body, {
subtree: false,
childList: false,
attributes: true,
attributeFilter: ['class'],
characterData: false
});
} catch (e) {
console.error('error setting up <body> class observer:', e);
}
}

applyUIFixes();

0 comments on commit 60536ac

Please sign in to comment.