Skip to content

Commit

Permalink
social icons
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickFuereder committed Dec 19, 2023
1 parent c07d4c5 commit db0d55e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 16 deletions.
7 changes: 6 additions & 1 deletion Assets/css/profile.css
Original file line number Diff line number Diff line change
Expand Up @@ -438,4 +438,9 @@ button.success {
button.error {
background-color: #d01d1d;
border: 2px solid #d01d1d;
}
}

a {
color: #fff;
text-decoration: none;
}
9 changes: 5 additions & 4 deletions Assets/js/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ async function LinkAccount(code) {
}

localStorage.removeItem('linkType');
const urlParams = new URLSearchParams(window.location.search);
urlParams.delete('code');

window.history.replaceState({}, document.title, window.location.pathname + window.location.search);
Expand Down Expand Up @@ -637,15 +638,15 @@ function LinkAccounts(type) {

switch (type) {
case 'spotify': {
window.location.href = 'https://accounts.spotify.com/de/authorize?client_id=a7c2014c0531405983d7050277dee3cb&response_type=code&redirect_uri=https://new.netdb.at/profile&scope=user-read-private%20user-read-email';
window.location.href = 'https://accounts.spotify.com/de/authorize?client_id=a7c2014c0531405983d7050277dee3cb&response_type=code&redirect_uri=https://netdb.at/profile&scope=user-read-private%20user-read-email';
break;
}
case 'discord': {
window.location.href = 'https://discord.com/api/oauth2/authorize?client_id=802237562625196084&redirect_uri=https://new.netdb.at/profile&response_type=code&scope=identify%20email';
window.location.href = 'https://discord.com/api/oauth2/authorize?client_id=802237562625196084&redirect_uri=https://netdb.at/profile&response_type=code&scope=identify%20email';
break;
}
case 'twitch': {
window.location.href = 'https://id.twitch.tv/oauth2/authorize?client_id=okxhfdyyoyx724c5zf0h869x9ry1sx&redirect_uri=https://new.netdb.at/profile&response_type=code&scope=user_read';
window.location.href = 'https://id.twitch.tv/oauth2/authorize?client_id=okxhfdyyoyx724c5zf0h869x9ry1sx&redirect_uri=https://netdb.at/profile&response_type=code&scope=user_read';
break;
}
case 'github': {
Expand All @@ -654,7 +655,7 @@ function LinkAccounts(type) {
}
case 'google': {
window.location.href =
'https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/userinfo.email&access_type=offline&include_granted_scopes=true&response_type=code&state=state_parameter_passthrough_value&redirect_uri=https://new.netdb.at/profile&client_id=736018590984-nh2ifch6ps8art9v35avipv16se1b720.apps.googleusercontent.com';
'https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/userinfo.email&access_type=offline&include_granted_scopes=true&response_type=code&state=state_parameter_passthrough_value&redirect_uri=https://netdb.at/profile&client_id=736018590984-nh2ifch6ps8art9v35avipv16se1b720.apps.googleusercontent.com';
break;
}
}
Expand Down
Loading

0 comments on commit db0d55e

Please sign in to comment.