From c4229b80069529d51ad98c5b17b839536b34e8ae Mon Sep 17 00:00:00 2001 From: yannickFuereder Date: Thu, 26 Oct 2023 14:22:37 +0200 Subject: [PATCH] account linking --- Assets/css/profile.css | 4 ++++ Assets/js/profile.js | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Assets/css/profile.css b/Assets/css/profile.css index ca9fe89..43acd3d 100644 --- a/Assets/css/profile.css +++ b/Assets/css/profile.css @@ -186,6 +186,10 @@ button:active { background-color: black; } +.connected-accounts h1:nth-child(6) { + background-color: black; +} + .connected-accounts .item > span:nth-child(3) { display: none; } diff --git a/Assets/js/profile.js b/Assets/js/profile.js index 52a0044..4252678 100644 --- a/Assets/js/profile.js +++ b/Assets/js/profile.js @@ -52,6 +52,9 @@ LoginManager.isLoggedIn().then(async (e) => { } localStorage.removeItem('linkType'); + urlParams.delete('code'); + + window.history.replaceState({}, document.title, window.location.pathname + window.location.search); //show account linked msg } @@ -319,7 +322,7 @@ function isNumber(str) { } async function disconnectAccount(e) { - const element = e.target.closest('h1'); + const element = e.target.closest('[data-type]'); await LoginManager.validateToken(); const req = await fetch('https://api.login.netdb.at/unlink/' + element.dataset.type, {