mirror of
https://github.com/dmuth/diceware.git
synced 2024-11-21 16:36:28 -05:00
Fixed indenting
This commit is contained in:
parent
1b625ad37a
commit
88312059f7
1 changed files with 39 additions and 40 deletions
79
main.js
79
main.js
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue