Skip to content

Commit

Permalink
Merge pull request #141 from throwaway96/transparency-fix-20240328
Browse files Browse the repository at this point in the history
Fix transparency (and possibly other UI issues)
  • Loading branch information
throwaway96 authored Mar 29, 2024
2 parents 21d1524 + 60536ac commit e853522
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 e853522

Please sign in to comment.