Add files via upload
Signed-off-by: AvaLilac <amyshimplays@gmail.com>
This commit is contained in:
parent
133576411f
commit
84ecbc5233
1 changed files with 34 additions and 0 deletions
34
src/aviaclientcategory.js
Normal file
34
src/aviaclientcategory.js
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
(function(){
|
||||||
|
if(window.__AVIA_CATEGORY_SETTINGS__) return;
|
||||||
|
window.__AVIA_CATEGORY_SETTINGS__ = true;
|
||||||
|
|
||||||
|
function inject(){
|
||||||
|
|
||||||
|
if(document.getElementById('avia-cloned-settings')) return;
|
||||||
|
|
||||||
|
const spans = [...document.querySelectorAll('span')];
|
||||||
|
const target = spans.find(s => s.textContent.trim() === "User Settings");
|
||||||
|
if(!target) return;
|
||||||
|
|
||||||
|
const container = target.closest('.d_flex.flex-d_column');
|
||||||
|
if(!container) return;
|
||||||
|
|
||||||
|
const clone = container.cloneNode(true);
|
||||||
|
clone.id = "avia-cloned-settings";
|
||||||
|
|
||||||
|
const header = clone.querySelector('span');
|
||||||
|
if(header) header.textContent = "AVIA CLIENT SETTINGS";
|
||||||
|
|
||||||
|
const list = clone.querySelector('.d_flex.flex-d_column.gap_var\\(--gap-s\\)');
|
||||||
|
if(list) list.innerHTML = "";
|
||||||
|
|
||||||
|
container.parentNode.insertBefore(clone, container.nextSibling);
|
||||||
|
}
|
||||||
|
|
||||||
|
new MutationObserver(() => {
|
||||||
|
inject();
|
||||||
|
}).observe(document.body, { childList: true, subtree: true });
|
||||||
|
|
||||||
|
inject();
|
||||||
|
|
||||||
|
})();
|
||||||
Loading…
Add table
Reference in a new issue