$(document).ready(function() {
var MSuser = "user";
var MSpass = "111111";
var MSbirthday = "01/01/2000";
var EmailDelay = 2000;
var RndSuffix = "_" + randomString(4);
var EmailDomain = "@inbox.si";
var FastSignupImg = "http://i.imgur.com/u9TS9sq.png";
var FastSignupPopup = '
';
if (document.domain === "www.nexon.net" && window.location.href.indexOf("finish-registration") !== -1) {
$(".nx_populate_newsletter").prop("checked", false);
document.getElementById("pw").value = MSpass;
document.getElementById("pw2").value = MSpass;
var bday_day = document.getElementsByClassName("day")[0];
var originalForm = document.getElementById("recaptcha_widget");
var finishForm = originalForm.cloneNode(true);
var theEmail = window.location.href.split("&")[1].replace("email=", "");
var bday_day = document.getElementsByClassName("day")[0];
var bday_month = document.getElementsByClassName("month")[0];
var bday_year = document.getElementsByClassName("year")[0];
bday_month.selectedIndex = MSbirthday.split("/")[0];
bday_day.selectedIndex = MSbirthday.split("/")[1];
var allYears = document.getElementsByTagName("option");
for (var i = 0; i < allYears.length; i++) {
if (allYears[i].value === MSbirthday.split("/")[2]) {
bday_year.selectedIndex = i - 44;
break;
}
}
var FastFinishedPopup = 'Finishing Fast Signup
Please enter the capctha below to finish.
Email: ' + unescape(theEmail) + '
Password: ' + MSpass + '
Birthday: ' + MSbirthday + '
' + unescape(finishForm.innerHTML) + '
';
nexon.gnt.popupGeneric(FastFinishedPopup);
$(".nx_recaptcha_button_audio:first").remove();
$(".nx_recaptcha_button_image:first").remove();
$(".nx_recaptcha_button_help:first").remove();
$("#finish_button").click(function () {
$("#finish_button").html("Working...");
document.getElementById("finish_button").setAttribute("id", "disabled_button");
finishForm.innerHTML = unescape(finishForm.innerHTML);
document.getElementById("registerForm").removeChild(originalForm);
document.getElementById("registerForm").appendChild(finishForm);
document.getElementById("finForm").setAttribute("id", "recaptcha_widget");
document.getElementById("captcha_verify").click();
});
}
if (window.location.href.split("=")[0] === "http://inbox.si/?m") {
var allAs = document.getElementsByTagName("a");
for (var i = 0; i < allAs.length; i++) {
if (allAs[i].href.indexOf("finish-registration") !== -1) {
document.cookie = "PHPSESSID" + "=; expires=Fri, 01 Jan 1970 00:00:01 GMT;";
if (top.location != self.location) {
top.location = allAs[i].href;
}
break;
}
}
}
if (document.domain === "maplestory.nexon.net") {
$(document).ready(function () {
$("#gnt_sign_up").clone()
.attr("class", "auto_signup")
.css("width", "90px")
.css("background-image", "url(" + FastSignupImg + ")")
.appendTo("#gnt_form");
$(".auto_signup").click(function () {
signup_hook();
});
});
}
if (document.domain === "inbox.si") {
alert("the good func was called")
if (document.referrer === "http://maplestory.nexon.net/" || document.referrer === "http://maplestory.nexon.net/#" && window.location.href.split("#")[2] === "undefined") {
document.cookie = "PHPSESSID" + "=; expires=Fri, 01 Jan 1970 00:00:01 GMT;";
window.location.href += "#1"
window.location.reload();
alert("clear cookie")
}
if (document.getElementById("setemailform") && window.location.href.indexOf("#") !== -1) {
document.getElementsByName("setemailaddress")[0].value = window.location.href.split("#")[1];
document.getElementsByName("setemail")[0].click();
alert("set email")
}
setTimeout(function () {
window.location = "http://inbox.si/";
var findShow = "Show";
var allAs = document.getElementsByTagName("a")
alert("finding message")
for (var i = 0; i < allAs.length; i++) {
if (allAs[i].innerHTML.indexOf(findShow) !== -1) {
allAs[i].setAttribute("onclick", "");
allAs[i].click();
break;
}
}
}, EmailDelay);
}
if (window.location.href === "http://inbox.si/" && !document.getElementById("setemailform") && !document.getElementsByName("mailform")[0]) {
alert("the fuck up was called")
setTimeout(function () {
window.location = "http://inbox.si/";
}, EmailDelay);
}
function signup_hook() {
nexon.gnt.popupGeneric(FastSignupPopup);
$("#proceed_button").click(function () {
FS_proceed();
});
$("#gen_button").click(function () {
RndSuffix = "_" + randomString(4);
document.getElementById('FS_inputu').value = MSuser + RndSuffix + EmailDomain;
});
}
function FS_proceed() {
var frameCtrl = document.getElementById("FS_frame");
var uInput = document.getElementById("FS_inputu");
var theStatus = document.getElementById("FS_status");
$("#proceed_button").html("Working...");
document.getElementById("proceed_button").setAttribute("id", "disabled_button");
$("#gen_button").css("display", "none");
frameCtrl.src = "https://www.nexon.net/api/v001/account/registration/initiate?callback=jQuery&email_address=" + uInput.value + "&tos_flag=1&service_code=SVG011&event_no=&_=0";
theStatus.innerHTML = "Sending information to Nexon...
";
setTimeout(function () {
frameCtrl.setAttribute("onload", "document.getElementById('FS_status').style.color = 'crimson'; document.getElementById('FS_status').innerHTML = 'Warning: Taking too long. Continue to wait or cancel & clear your cookies.
'; this.src='http://inbox.si/#'+document.getElementById('FS_inputu').value.split('@')[0];");
}, 99999);
frameCtrl.setAttribute("onload", "document.getElementById('FS_status').innerHTML = 'Registration email sent to '+document.getElementById('FS_inputu').value+'
Waiting for verification url which may take a minute...'; this.src='http://inbox.si/#'+document.getElementById('FS_inputu').value.split('@')[0];");
}
function randomString(len, charSet) {
charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var randomString = '';
for (var i = 0; i < len; i++) {
var randomPoz = Math.floor(Math.random() * charSet.length);
randomString += charSet.substring(randomPoz, randomPoz + 1);
}
return randomString;
}
});