Update window open to reflect sametarget status

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

View File

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