mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-21 11:55:15 +01:00
Use hash in minecraft.id redirect URL
This commit is contained in:
parent
0b21cf356d
commit
a99ada3d18
@ -1,6 +1,6 @@
|
||||
$(() => {
|
||||
let urlParams = new URLSearchParams();
|
||||
window.location.search.split("?").map(it => new URLSearchParams(it).forEach((a, b) => urlParams.append(b, a)));
|
||||
window.location.hash.split("?").map(it => new URLSearchParams(it).forEach((a, b) => urlParams.append(b, a)));
|
||||
var username = urlParams.get("username");
|
||||
var mcauth_code = urlParams.get("mcauth_code");
|
||||
if (urlParams.get("mcauth_success") == "false") {
|
||||
@ -189,7 +189,7 @@ $(() => {
|
||||
link.href = "javascript:";
|
||||
link.onclick = () => {
|
||||
let user = prompt("Username (Minecraft.ID is case-sensitive): ", "");
|
||||
let callbackUrl = new URL(location.origin + location.pathname + "?username=" + encodeURIComponent(user));
|
||||
let callbackUrl = new URL(location.origin + location.pathname + "#username=" + encodeURIComponent(user));
|
||||
location = "https://api.minecraft.id/gateway/start/" + encodeURIComponent(user) + "?callback=" + encodeURIComponent(callbackUrl);
|
||||
};
|
||||
content.appendChild(p);
|
||||
|
Loading…
Reference in New Issue
Block a user