This Plugin is integrated as it fix's the bug where the buttons inside the tooltip do not hide when you look in a channel where you cant talk in. making the buttons push onto the other side till you reload the chat bar. futureproof. This plugin is made by 0simp#2291 Full credits to them for making this possible Signed-off-by: AvaLilac <257690424+AvaLilac@users.noreply.github.com>
29 lines
No EOL
869 B
JavaScript
29 lines
No EOL
869 B
JavaScript
(function () {
|
|
if (window.__BUTTON_FIX__) return;
|
|
window.__BUTTON_FIX__ = true;
|
|
|
|
function uninjectButton(button){
|
|
if(button){
|
|
button.parentElement.removeChild(button)
|
|
}
|
|
}
|
|
|
|
const observer = new MutationObserver(()=>{
|
|
let balls = [];
|
|
document.querySelectorAll('div[class=\'flex-sh_0 d_flex ai_end jc_center w_42px\']').forEach(element=>{
|
|
if(element.id?.includes('avia')){
|
|
balls.push(element)
|
|
}
|
|
})
|
|
|
|
const gifSpan = [...document.querySelectorAll("span.material-symbols-outlined")]
|
|
.find(s => s.textContent.trim() === "gif");
|
|
|
|
if(!gifSpan){
|
|
balls.forEach(element=>{
|
|
uninjectButton(element)
|
|
})
|
|
}
|
|
});
|
|
observer.observe(document.documentElement, {childList: true, subtree: true })
|
|
})(); |