Fix requests firing before user is logged in

This commit is contained in:
HighImKevin
2026-10-16 13:09:10 -04:00
parent 8912785ad9
commit da932f918a
3 changed files with 9 additions and 7 deletions
+5
View File
@@ -267,6 +267,11 @@
async function initialize() {
ensureApiClient();
// Wait for login
if (window.userHelper?.waitForLogin) {
await window.userHelper.waitForLogin();
}
if (__libraries) {
return;
-7
View File
@@ -3000,13 +3000,6 @@ window.KefinTweaksConfig = ${JSON.stringify(config, null, 2)};`;
const hash = String(window.location.hash || '');
let watchlistUrl = activePageWatchlistUrl || window.KefinTweaksUtils?._watchlistUrl || null;
if (!watchlistUrl) {
getWatchlistUrl().then((url) => {
activePageWatchlistUrl = url;
updateActivePage();
}).catch(() => { /* ignore */ });
}
let page = '';
const tabMatch = hash.match(/[?&]tab=(\d+)/);
const tabIndex = tabMatch ? tabMatch[1] : null;
+4
View File
@@ -7637,6 +7637,10 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
};
const run = async () => {
if (window.userHelper?.waitForLogin) {
await window.userHelper.waitForLogin();
}
await addCustomWatchlistPage();
await addCustomMenuLink();
await addWatchlistPageHandler();