mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 22:47:04 +01:00
Fix sametarget
This commit is contained in:
parent
2d5a5b5131
commit
94c5e5c91a
@ -2037,17 +2037,15 @@ var passedCookieTest = true; // If passed cross origin test
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("#discordlogin_btn").click(function(e) {
|
$("#discordlogin_btn").click(function(e) {
|
||||||
|
if (getParameterByName("sametarget") != "true") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var target = "_blank";
|
var wid = window.open($("#discordlogin_btn").attr("href"), "_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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
lock_login_fields();
|
lock_login_fields();
|
||||||
wait_for_discord_login();
|
wait_for_discord_login();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user