Fixed indenting

This commit is contained in:
Douglas Muth 2017-02-17 23:41:24 -05:00
parent 1b625ad37a
commit 88312059f7

79
main.js
View file

@ -480,56 +480,55 @@ Diceware.go = function() {
jQuery("#roll_dice").on("click", Diceware.rollDiceHandler); jQuery("#roll_dice").on("click", Diceware.rollDiceHandler);
// //
// If we're not on a mobile, bring in the GitHub ribbon. // If we're not on a mobile, bring in the GitHub ribbon.
// //
if (!Diceware.is_mobile()) { if (!Diceware.is_mobile()) {
jQuery("#github_ribbon").fadeIn(1000); jQuery("#github_ribbon").fadeIn(1000);
} }
if (!Diceware.i_can_has_good_crypto()) {
jQuery(".source .bad_crypto").clone().hide().fadeIn(800).appendTo(".message");
}
if (!Diceware.i_can_has_good_crypto()) { //
jQuery(".source .bad_crypto").clone().hide().fadeIn(800).appendTo(".message"); // Load our wordlist.
} //
jQuery.getScript("./wordlist/wordlist-5-dice.js").done(
function(data) {
//
// If "debug" is set in the GET data, roll the dice on page load.
// Speed up my development a bit. :-)
//
var debug = location.search.indexOf("debug");
// if (debug != -1) {
// Load our wordlist.
//
jQuery.getScript("./wordlist/wordlist-5-dice.js").done(
function(data) {
// //
// If "debug" is set in the GET data, roll the dice on page load. // Grab our number in the GET data, sanitize it, and click the appropriate button.
// Speed up my development a bit. :-)
// //
var debug = location.search.indexOf("debug"); var offset = location.search.search("=");
var num = location.search[offset + 1];
if (debug != -1) { if (num < 2) {
num = 2;
// } else if (num > 8) {
// Grab our number in the GET data, sanitize it, and click the appropriate button. num = 8;
//
var offset = location.search.search("=");
var num = location.search[offset + 1];
if (num < 2) {
num = 2;
} else if (num > 8) {
num = 8;
}
var id="#button-dice-" + num;
jQuery(id).click();
jQuery("#roll_dice").click();
} }
}).fail( var id="#button-dice-" + num;
function(jqxhr, settings, exception) { jQuery(id).click();
console.log("Error loading Javascript:", jqxhr.status, settings, exception);
}); jQuery("#roll_dice").click();
}
}).fail(
function(jqxhr, settings, exception) {
console.log("Error loading Javascript:", jqxhr.status, settings, exception);
});
} // End of go() } // End of go()