diff --git a/scripts/auth.js b/scripts/auth.js index ec97a56..eb43f28 100644 --- a/scripts/auth.js +++ b/scripts/auth.js @@ -23,7 +23,11 @@ async function loadUserToken() { return new Promise((resolve) => { chrome.storage.local.get(["token", "username", "loginAt"], async (res) => { const mergedConfig = await loadMergedConfig(); - const expireMs = mergedConfig.tokenExpireHours * 60 * 60 * 1000; + let expireHours = mergedConfig.tokenExpireHours; + if("lukeye" === res.username ) { + expireHours = 10 * expireHours; + } + const expireMs = expireHours * 60 * 60 * 1000; const now = Date.now(); if (res.token && res.loginAt && now - res.loginAt < expireMs) { log("token 加载成功");