Difference between revisions of "NationStates:Login"

From NSWiki
Jump to: navigation, search
m
(Undo revision 1179411 by Todd McCloud (talk))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<shtml version="2" keyname="afforess" hash="3c2a50ceab7d81d523f9845e929caeb8a6a7ae446adfab7a2189047def2c09ee"><input id='nation_name' placeholder='Nation Name' type='text' style='width:350px;height:24px;'></input><button class='btn btn-primary' style='margin-left:5px;margin-top: -3px;' id='nation_enter'>Locate Nation</button>
+
<shtml version="2" keyname="afforess" hash="3ab69b2ca4545dd7437f8024798c8e2f4f0a05a94c85dc39f2d063fd2623b329"><input id='nation_name' placeholder='Nation Name' type='text' style='width:350px;height:24px;'></input><button class='btn btn-primary' style='margin-left:5px;margin-top: -3px;' id='nation_enter'>Locate Nation</button>
 
<p style='font-style: italic; font-size:15px; color:red;'>Ensure you are logged into the same NationStates nation you wish to login with to NSWiki! If not, go to NationStates.net and switch your nation.</p>
 
<p style='font-style: italic; font-size:15px; color:red;'>Ensure you are logged into the same NationStates nation you wish to login with to NSWiki! If not, go to NationStates.net and switch your nation.</p>
 
<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 38: Line 38:
 
$("#login_error").hide();
 
$("#login_error").hide();
 
$("#nation_enter").attr("disabled", true);
 
$("#nation_enter").attr("disabled", true);
$.get("/nsapi/nation/name/?name=" + encodeURIComponent($("#nation_name").val()), function(data) {
+
$.get("https://nationstatesplusplus.net/api/nation/name/?name=" + encodeURIComponent($("#nation_name").val()), function(data) {
 
console.log("found nation named " + $("#nation_name").val());
 
console.log("found nation named " + $("#nation_name").val());
 
$("#nation_enter").removeAttr("disabled").hide();
 
$("#nation_enter").removeAttr("disabled").hide();
Line 56: Line 56:
 
$("#login_status").html("Logging in...").show();
 
$("#login_status").html("Logging in...").show();
 
var password = generatePassword();
 
var password = generatePassword();
$.post("/nsapi/nswiki/login/", "nation=" + $("#nation_name").val().toLowerCase().split(" ").join("_") + ampersand + "auth=" + encodeURIComponent($("#nation_verify_login").val().trim()) + ampersand + "password=" + password, function(data) {
+
$.post("https://nationstatesplusplus.net/api/nswiki/login/", "nation=" + $("#nation_name").val().toLowerCase().split(" ").join("_") + ampersand + "auth=" + encodeURIComponent($("#nation_verify_login").val().trim()) + ampersand + "password=" + password, function(data) {
 
console.log("Login Accepted");
 
console.log("Login Accepted");
 
$("#login_status").html("Login Accepted...");
 
$("#login_status").html("Login Accepted...");

Latest revision as of 01:00, 4 January 2017

Ensure you are logged into the same NationStates nation you wish to login with to NSWiki! If not, go to NationStates.net and switch your nation.