Difference between revisions of "NationStates:Login"

From NSWiki
Jump to: navigation, search
m
m (lowercase)
Line 1: Line 1:
<shtml version="2" keyname="afforess" hash="3b9290fb645a41bae54ce39eb310d182b10b0e2f5f9074354f59e58c2ae95e29"><input id='nation_name' placeholder='Nation Name' type='text' style='width:350px;height:24px;'></input><button class='btn' style='margin-left:5px;margin-top: -3px;' id='nation_enter'>Locate Nation</button>
+
<shtml version="2" keyname="afforess" hash="023ee342b4ec1700d86a7268f252e8bf51c58a901b0eb19e5f3f8960f8707165"><input id='nation_name' placeholder='Nation Name' type='text' style='width:350px;height:24px;'></input><button class='btn' style='margin-left:5px;margin-top: -3px;' id='nation_enter'>Locate Nation</button>
 
<p id='login_error' style='color:red; font-weight:bold; display:none;'>An Error Occured</p>
 
<p id='login_error' style='color:red; font-weight:bold; display:none;'>An Error Occured</p>
  
Line 30: Line 30:
 
var password = Date.now() + $("#nation_name").val().toLowerCase().split(" ").join("");
 
var password = Date.now() + $("#nation_name").val().toLowerCase().split(" ").join("");
 
$("#nation_name").attr("password", password);
 
$("#nation_name").attr("password", password);
$.post("/nsapi/nswiki/login/", "nation=" + encodeURIComponent($("#nation_name").val())
+
$.post("/nsapi/nswiki/login/", "nation=" + $("#nation_name").val().toLowerCase().split(" ").join("_") + "&auth=" + encodeURIComponent($("#nation_verify_login").val().trim()) + "&password=" + password, function(data) {
+ "&auth=" + encodeURIComponent($("#nation_verify_login").val().trim())
+
+ "&password=" + password, function(data) {
+
 
console.log("Accepted login");
 
console.log("Accepted login");
 
$.get("http://nswiki.org/index.php?title=Special:UserLogin", function(data) {
 
$.get("http://nswiki.org/index.php?title=Special:UserLogin", function(data) {

Revision as of 20:33, 22 January 2014