fix: reduce unchecked type-cast

This commit is contained in:
JellyBrick
2023-09-30 08:35:16 +09:00
parent f532398a9c
commit 72660f5aa1
15 changed files with 256 additions and 178 deletions

View File

@ -25,7 +25,7 @@ const menuObserver = new MutationObserver(() => {
return;
}
const menuUrl = (document.querySelector('tp-yt-paper-listbox [tabindex="0"] #navigation-endpoint') as HTMLAnchorElement | undefined)?.href;
const menuUrl = document.querySelector<HTMLAnchorElement>('tp-yt-paper-listbox [tabindex="0"] #navigation-endpoint')?.href;
if (!menuUrl?.includes('watch?') && doneFirstLoad) {
return;
}