fix: settings and info not appearing (#507)

Query the right element to get the info div
This commit is contained in:
Baba 2023-11-16 15:09:46 -03:00 committed by GitHub
parent fa9049c7b2
commit 641af3be13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,10 +73,7 @@ sleep(5000).then(async () => {
// Settings info version injection // Settings info version injection
setInterval(() => { setInterval(() => {
// @ts-expect-error const host = document.querySelector('[class*="sidebar"] [class*="info"]');
const host = [...document.querySelectorAll('[class*="sidebar"] [class*="info"] [class*="line"]')].find((x) =>
x.textContent.startsWith("Host ")
);
if (!host || host.querySelector("#ac-ver")) { if (!host || host.querySelector("#ac-ver")) {
return; return;
} }