master
Keith Irwin 2018-03-09 02:38:49 +00:00
parent d4e1f5f726
commit 2ed0eed17e
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
5 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
"use strict";var validEmail,validMessage;function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function validateForm(e){if("email"===e&&(validateEmail($("#email-input").val())?(validEmail=!0,$("#email-help").hide(),validateForm()):(validEmail=!1,$("#email-help").show(),$("#submit-button").prop("disabled",!0).prop("title","You need to enter a valid email address. "))),"message"!==e)return validEmail&&validMessage?($("#submit-button").prop("disabled",!1).prop("title","Click here to send your message. "),!0):($("#submit-button").prop("disabled",!0).prop("title","Edit the form before clicking send. "),!1);""===$("#message-input").val()?(validMessage=!1,$("#message-help").show(),$("#submit-button").prop("disabled",!0).prop("title","You need to enter a message. ")):(validMessage=!0,$("#message-help").hide(),validateForm())}$(function(){validEmail=!!validateEmail($("#email-input").val()),validMessage=""===!$("#message-input").val(),setTimeout(validateForm,1e3)}),window.onSubmit=function(){validateForm()&&$("#contact-form").submit()},$("#email-input").change(function(){validateForm("email")}),$("#message-input").change(function(){validateForm("message")});
"use strict";let validEmail,validMessage;function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function validateForm(e){if("email"===e&&(validateEmail($("#email-input").val())?(validEmail=!0,$("#email-help").hide(),validateForm()):(validEmail=!1,$("#email-help").show(),$("#submit-button").prop("disabled",!0).prop("title","You need to enter a valid email address. "))),"message"!==e)return validEmail&&validMessage?($("#submit-button").prop("disabled",!1).prop("title","Click here to send your message. "),!0):($("#submit-button").prop("disabled",!0).prop("title","Edit the form before clicking send. "),!1);""===$("#message-input").val()?(validMessage=!1,$("#message-help").show(),$("#submit-button").prop("disabled",!0).prop("title","You need to enter a message. ")):(validMessage=!0,$("#message-help").hide(),validateForm())}$(function(){validEmail=!!validateEmail($("#email-input").val()),validMessage=""===!$("#message-input").val(),setTimeout(validateForm,1e3)}),window.onSubmit=function(){validateForm()&&$("#contact-form").submit()},$("#email-input").change(function(){validateForm("email")}),$("#message-input").change(function(){validateForm("message")});

View File

@ -1 +1 @@
"use strict";function setFooter(){var o=$(window).height(),t=$("footer").offset().top+$("footer").height();o>t&&$("footer").css("margin-top",o-t)}$(function(){setFooter()}),$(window).resize(function(){setFooter()});
"use strict";function setFooter(){const o=$(window).height(),t=$("footer").offset().top+$("footer").height();o>t&&$("footer").css("margin-top",o-t)}$(function(){setFooter()}),$(window).resize(function(){setFooter()});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";const zxcvbn=require("zxcvbn");function checkMatch(){$("#submit").prop("title","You need to type your password again before you can save it. "),$("#p1").val()===$("#p2").val()?$("#submit").prop("disabled",!1).prop("title","Click here to save your password. "):""!==$("#p2").val()&&($("#password-help").text("Those passwords don't match... ").css({color:"#fb6e3d"}),$("#submit").prop("disabled",!0).prop("title","You need to type the same password twice before you can save it. "))}$(function(){$(".password").keyup(function(){if(""===$("#p1").val()&&""===$("#p2").val())$("#password-help").hide(),$("#submit").prop("disabled",!0).prop("title","You need to enter a password first. ");else if(""===$("#p1").val())$("#password-help").show().text("Those passwords don't match... "),$("#submit").prop("disabled",!0).prop("title","You need to type the same password twice correctly before you can save it. ");else{$("#password-help").show();var e=zxcvbn($("#p1").val());e.crack_times_seconds.online_no_throttling_10_per_second<3600?($("#password-help").text("That password is way too common or simple. You may not use it for Tracman and should not use it anywhere. ").css({color:"#fb6e3d"}),$("#submit").prop("disabled",!0).prop("title","You need to come up with a better password. ")):e.crack_times_seconds.online_no_throttling_10_per_second<86400?($("#password-help").text("That password is pretty bad. It could be cracked in "+e.crack_times_display.online_no_throttling_10_per_second+". Try adding more words, numbers, or symbols. ").css({color:"#fb6e3d"}),$("#submit").prop("disabled",!0).prop("title","You need to come up with a better password. ")):e.crack_times_seconds.online_no_throttling_10_per_second<864e3?($("#password-help").text("That password isn't good enough. It could be cracked in "+e.crack_times_display.online_no_throttling_10_per_second+". Try adding another word, number, or symbol. ").css({color:"#fb6e3d"}),$("#submit").prop("disabled",!0).prop("title","You need to come up with a better password. ")):e.crack_times_seconds.online_no_throttling_10_per_second<=2592e3?($("#password-help").text("That password is good enough, but it could still be cracked in "+e.crack_times_display.online_no_throttling_10_per_second+". ").css({color:"#eee"}),checkMatch()):e.crack_times_seconds.online_no_throttling_10_per_second<=1314e3?($("#password-help").text("That password is good. It would take "+e.crack_times_display.online_no_throttling_10_per_second+" to crack. ").css({color:"#8ae137"}),checkMatch()):($("#password-help").text("That password is great! It could take "+e.crack_times_display.online_no_throttling_10_per_second+" to crack!").css({color:"#8ae137"}),checkMatch())}}),$("#show").click(function(){$(this).is(":checked")?$(".password").attr("type","text"):$(".password").attr("type","password")})});
"use strict";const zxcvbn=require("zxcvbn");function checkMatch(){$("#submit").prop("title","You need to type your password again before you can save it. "),$("#p1").val()===$("#p2").val()?$("#submit").prop("disabled",!1).prop("title","Click here to save your password. "):""!==$("#p2").val()&&($("#password-help").text("Those passwords don't match... ").css({color:"#fb6e3d"}),$("#submit").prop("disabled",!0).prop("title","You need to type the same password twice before you can save it. "))}$(function(){$(".password").keyup(function(){if(""===$("#p1").val()&&""===$("#p2").val())$("#password-help").hide(),$("#submit").prop("disabled",!0).prop("title","You need to enter a password first. ");else if(""===$("#p1").val())$("#password-help").show().text("Those passwords don't match... "),$("#submit").prop("disabled",!0).prop("title","You need to type the same password twice correctly before you can save it. ");else{$("#password-help").show();let e=zxcvbn($("#p1").val());e.crack_times_seconds.online_no_throttling_10_per_second<3600?($("#password-help").text("That password is way too common or simple. You may not use it for Tracman and should not use it anywhere. ").css({color:"#fb6e3d"}),$("#submit").prop("disabled",!0).prop("title","You need to come up with a better password. ")):e.crack_times_seconds.online_no_throttling_10_per_second<86400?($("#password-help").text("That password is pretty bad. It could be cracked in "+e.crack_times_display.online_no_throttling_10_per_second+". Try adding more words, numbers, or symbols. ").css({color:"#fb6e3d"}),$("#submit").prop("disabled",!0).prop("title","You need to come up with a better password. ")):e.crack_times_seconds.online_no_throttling_10_per_second<864e3?($("#password-help").text("That password isn't good enough. It could be cracked in "+e.crack_times_display.online_no_throttling_10_per_second+". Try adding another word, number, or symbol. ").css({color:"#fb6e3d"}),$("#submit").prop("disabled",!0).prop("title","You need to come up with a better password. ")):e.crack_times_seconds.online_no_throttling_10_per_second<=2592e3?($("#password-help").text("That password is good enough, but it could still be cracked in "+e.crack_times_display.online_no_throttling_10_per_second+". ").css({color:"#eee"}),checkMatch()):e.crack_times_seconds.online_no_throttling_10_per_second<=1314e3?($("#password-help").text("That password is good. It would take "+e.crack_times_display.online_no_throttling_10_per_second+" to crack. ").css({color:"#8ae137"}),checkMatch()):($("#password-help").text("That password is great! It could take "+e.crack_times_display.online_no_throttling_10_per_second+" to crack!").css({color:"#8ae137"}),checkMatch())}}),$("#show").click(function(){$(this).is(":checked")?$(".password").attr("type","text"):$(".password").attr("type","password")})});

View File

@ -1 +1 @@
"use strict";function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function replaceFromEndpoint(e,i,t){$.get("/validate?"+e+"="+$(i).val()).done(function(e){$(i).val(e),t()})}$(function(){var e,i;function t(t){!function(t){var n=0;$("#slug-input").val()?(e||$("#slug-help").hide(),n>0?t():n++):($("#slug-help").show().text("A slug is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a slug. "),n>0?t():n++);$("#email-input").val()?validateEmail($("#email-input").val())?(i||$("#email-help").hide(),n>0?t():n++):($("#email-help").show().text("You must enter a valid email address. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a valid email address. "),n>0?t():n++):($("#email-help").show().text("An email is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter an email address. "),n>0?t():n++)}(function(){!function(t){function n(){$("#email-help").is(":visible")&&"Unable to confirm unique "!==$("#email-help").text().substring(0,25)?$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different email address. "):$("#slug-help").is(":visible")&&"Unable to confirm unique "!==$("#slug-help").text().substring(0,25)?$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different slug. "):"Unable to confirm unique "===$("#slug-help").text().substring(0,25)?$("#submit-group .main").prop("title","Unable to confirm unique slug with the server. This might not work... "):"Unable to confirm unique "===$("#email-help").text().substring(0,25)?$("#submit-group .main").prop("title","Unable to confirm unique email with the server. This might not work... "):$("#submit-group .main").prop("disabled",!1).prop("title","Click here to save your changes. ")}t&&$("#"+t+"-input").val()?("email"===!t||validateEmail($("#email-input").val()))&&$.ajax({url:"/validate?"+t+"="+$("#"+t+"-input").val(),type:"GET",statusCode:{200:function(){$("#"+t+"-help").hide(),"slug"===t?e=!1:"email"===t&&(i=!1),n()},400:function(){"slug"===t?e=!0:"email"===t&&(i=!0),$("#"+t+"-help").show().text("That "+t+" is already in use by another user. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different "+t+". ")}}}).error(function(){"slug"===t?e=void 0:"email"===t&&(i=void 0),$("#"+t+"-help").show().text("Unable to confirm unique "+t+". This might not work... "),n()}):n()}(t)})}$("#password").attr("href","/account/password?tz="+(new Date).getTimezoneOffset()),$("#delete").click(function(){confirm("Are you sure you want to delete your account? This CANNOT be undone! ")&&(window.location.href="/settings/delete")}),$("#slug-input").change(function(){$("#slug-input").val()?($("#slug-help").hide(),replaceFromEndpoint("slugify","#slug-input",function(){t("slug")})):($("#slug-help").show().text("A slug is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a slug. "))}),$("#email-input").change(function(){t("email")}),$("#name-input").change(function(){replaceFromEndpoint("xss","#name-input",t)})});
"use strict";function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function replaceFromEndpoint(e,i,t){$.get("/validate?"+e+"="+$(i).val()).done(function(e){$(i).val(e),t()})}$(function(){let e,i;function t(t){!function(t){let n=0;$("#slug-input").val()?(e||$("#slug-help").hide(),n>0?t():n++):($("#slug-help").show().text("A slug is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a slug. "),n>0?t():n++);$("#email-input").val()?validateEmail($("#email-input").val())?(i||$("#email-help").hide(),n>0?t():n++):($("#email-help").show().text("You must enter a valid email address. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a valid email address. "),n>0?t():n++):($("#email-help").show().text("An email is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter an email address. "),n>0?t():n++)}(function(){!function(t){function n(){$("#email-help").is(":visible")&&"Unable to confirm unique "!==$("#email-help").text().substring(0,25)?$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different email address. "):$("#slug-help").is(":visible")&&"Unable to confirm unique "!==$("#slug-help").text().substring(0,25)?$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different slug. "):"Unable to confirm unique "===$("#slug-help").text().substring(0,25)?$("#submit-group .main").prop("title","Unable to confirm unique slug with the server. This might not work... "):"Unable to confirm unique "===$("#email-help").text().substring(0,25)?$("#submit-group .main").prop("title","Unable to confirm unique email with the server. This might not work... "):$("#submit-group .main").prop("disabled",!1).prop("title","Click here to save your changes. ")}t&&$("#"+t+"-input").val()?("email"===!t||validateEmail($("#email-input").val()))&&$.ajax({url:"/validate?"+t+"="+$("#"+t+"-input").val(),type:"GET",statusCode:{200:function(){$("#"+t+"-help").hide(),"slug"===t?e=!1:"email"===t&&(i=!1),n()},400:function(){"slug"===t?e=!0:"email"===t&&(i=!0),$("#"+t+"-help").show().text("That "+t+" is already in use by another user. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different "+t+". ")}}}).error(function(){"slug"===t?e=void 0:"email"===t&&(i=void 0),$("#"+t+"-help").show().text("Unable to confirm unique "+t+". This might not work... "),n()}):n()}(t)})}$("#password").attr("href","/account/password?tz="+(new Date).getTimezoneOffset()),$("#delete").click(function(){confirm("Are you sure you want to delete your account? This CANNOT be undone! ")&&(window.location.href="/settings/delete")}),$("#slug-input").change(function(){$("#slug-input").val()?($("#slug-help").hide(),replaceFromEndpoint("slugify","#slug-input",function(){t("slug")})):($("#slug-help").show().text("A slug is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a slug. "))}),$("#email-input").change(function(){t("email")}),$("#name-input").change(function(){replaceFromEndpoint("xss","#name-input",t)})});