fix: game login

This commit is contained in:
2025-08-15 23:18:26 +08:00
parent 99104527d4
commit ca2e971c6d
2 changed files with 92 additions and 49 deletions

View File

@@ -219,7 +219,15 @@ InitWebLocalization();
async function getRSILauncherToken(channelId) {
if (!window.location.href.includes("robertsspaceindustries.com")) return;
let loginBodyElement = $(".c-form.c-signIn");
// check if logged in and fix redirect
if (window.location.href.endsWith('/connect?jumpto=/account/dashboard')) {
if (document.body.textContent.trim() === "/account/dashboard") {
window.location.href = "https://robertsspaceindustries.com/account/dashboard";
return;
}
}
let loginBodyElement = $(".c-form authenticationForm sign_in");
loginBodyElement.show();
// wait login
window.chrome.webview.postMessage({ action: 'webview_rsi_login_show_window' });