diff --git a/typescript/main.ts b/typescript/main.ts index a5e8b51d..4669b7b1 100644 --- a/typescript/main.ts +++ b/typescript/main.ts @@ -42,6 +42,7 @@ function pageSpecificFunctions(settings: UserSettings) { saveRedirect(); break; case '/account': + case '/api/oauth/style/link': checkRedirect(settings.redirect); break; } diff --git a/typescript/page/account.ts b/typescript/page/account.ts index 0c5108f0..c4dccb9e 100644 --- a/typescript/page/account.ts +++ b/typescript/page/account.ts @@ -3,6 +3,8 @@ import {storeNewSettings} from 'utils/storage'; export function checkRedirect(redirect: string) { if (redirect) { storeNewSettings({redirect: ''}); - window.location.href = window.location.origin + redirect; + if (window.location.href !== redirect) { + window.location.href = redirect; + } } }