Difference between revisions of "NationStates:Login"
From NSWiki
m (fix ampersands) |
m (handle spaces) |
||
Line 1: | Line 1: | ||
− | <shtml version="2" keyname="afforess" hash=" | + | <shtml version="2" keyname="afforess" hash="5e979a2cd62f805aab1363a6a02b4f4cd920f0376420809de62e04f72e06d94f"><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 37: | Line 37: | ||
var token = $("input[name='wpLoginToken']").val(); | var token = $("input[name='wpLoginToken']").val(); | ||
console.log("Lokin token: " + token); | console.log("Lokin token: " + token); | ||
− | $.post("http://nswiki.org/index.php?title=Special:UserLogin" + ampersand + "action=submitlogin" + ampersand + "type=login", "wpName=" + | + | $.post("http://nswiki.org/index.php?title=Special:UserLogin" + ampersand + "action=submitlogin" + ampersand + "type=login", "wpName=" + $("#nation_name").val().split(" ").join("+") + ampersand + "wpPassword=" + $("#nation_name").attr("password") + ampersand + "wpRemember=1" + ampersand + "wpLoginAttempt=Log+in" + ampersand + "wpLoginToken=b41707a7bcb6c93ec75bb44cc30c5187", function(data) { |
console.log("Login Successful"); | console.log("Login Successful"); | ||
console.log(data); | console.log(data); |
Revision as of 21:04, 22 January 2014