Fix sametarget

This commit is contained in:
Jeremy "EndenDragon" Zhang 2021-03-09 04:07:07 -08:00 committed by GitHub
parent 2d5a5b5131
commit 94c5e5c91a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2037,17 +2037,15 @@ var passedCookieTest = true; // If passed cross origin test
}
$("#discordlogin_btn").click(function(e) {
if (getParameterByName("sametarget") != "true") {
e.preventDefault();
var target = "_blank";
if (getParameterByName("sametarget") == "true") {
target = "";
}
var wid = window.open($("#discordlogin_btn").attr("href"), target);
var wid = window.open($("#discordlogin_btn").attr("href"), "_blank");
postRobot.on("setSession", { window: wid }, function(event) {
if (!passedCookieTest) {
session = event.data.session;
}
});
}
lock_login_fields();
wait_for_discord_login();
});