From ac1b93677cd5691bb7eebc2d898cec1ecc6901ce Mon Sep 17 00:00:00 2001 From: AvaLilac <257690424+AvaLilac@users.noreply.github.com> Date: Sat, 28 Mar 2026 16:19:08 -0400 Subject: [PATCH] Fix's toolbar button injection 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> --- avia_core/ButtonFix.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 avia_core/ButtonFix.js diff --git a/avia_core/ButtonFix.js b/avia_core/ButtonFix.js new file mode 100644 index 0000000..8a6b143 --- /dev/null +++ b/avia_core/ButtonFix.js @@ -0,0 +1,29 @@ +(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 }) +})(); \ No newline at end of file