// ==UserScript== // @name MapleStory Fast Registration // @namespace MSFReg // @author Cam // @description Allows fast, simple MapleStory account creation. // @include http://maplestory.nexon.net / / @include http://www.nexon.net/account/finish-registration/* // @include http://inbox.si/ // @version 1.1 // @grant none // @icon http://nxcache.nexon.net/nexon.ico // @run-at document-end // ==/UserScript== var MSuser = "Cam"; var MSpass = "111111"; var MSbirthday = "02/01/1990"; var RndSuffix = "_" + randomString(4); var EmailDomain = "@inbox.si"; var FastSignupImg = "http://i.imgur.com/u9TS9sq.png" var FastSignupPopup = '
Fast Signup

You may click the email below to manually edit it.

Email:
Password:
Birthday:

Status -

Waiting...

New Email
Proceed
Cancel
'; 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 finishedPopup = '
Finishing Fast Signup

Please enter the capctha to finish.
Email: ' + unescape(theEmail) + '
Password: ' + MSpass + '
Birthday: ' + MSbirthday + '

' + unescape(finishForm.innerHTML) + '
Finish
'; nexon.gnt.popupGeneric(finishedPopup); $(".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=Thu, 01 Jan 1970 00:00:01 GMT;"; if (top.location != self.location) { top.location = allAs[i].href; } break; } } } if (location.href === "http://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") { if (document.getElementById("setemailform") && window.location.href.indexOf("#") !== -1) { document.getElementsByName("setemailaddress")[0].value = window.location.href.split("#")[1]; document.getElementsByName("setemail")[0].click(); } setTimeout(function () { window.location = "http://inbox.si/"; var findShow = "Show"; var allAs = document.getElementsByTagName("a") for (var i = 0; i < allAs.length; i++) { if (allAs[i].innerHTML.indexOf(findShow) !== -1) { allAs[i].setAttribute("onclick", ""); allAs[i].click(); break; } } }, 2000); } if (window.location.href === "http://inbox.si/" && !document.getElementById("setemailform") && !document.getElementsByName("mailform")[0]) { setTimeout(function () { window.location = "http://inbox.si/"; }, 2000); } 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").css("background", "#B8860B !important").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...

"; 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; }