mirror of
https://github.com/dmuth/diceware.git
synced 2024-12-22 16:23:42 +00:00
Made unintentional globals local, as per #3.
This commit is contained in:
parent
76ae54fc07
commit
29be88c9e3
1 changed files with 3 additions and 3 deletions
6
main.js
6
main.js
|
@ -80,7 +80,7 @@ Diceware.getBase6 = function(roll, num_dice) {
|
|||
var num_dice_left = num_dice - 1;
|
||||
var dice_value_left = roll;
|
||||
|
||||
for (i = num_dice_left; i >= 0; i--) {
|
||||
for (var i = num_dice_left; i >= 0; i--) {
|
||||
|
||||
var die_value = Math.pow(6, i);
|
||||
var value = Math.floor( dice_value_left / die_value);
|
||||
|
@ -417,7 +417,7 @@ Diceware.go = function() {
|
|||
jQuery(".results_num_possible_value").html(num_passwords.toLocaleString("en"));
|
||||
|
||||
var rows = new Array();
|
||||
for (key in rolls) {
|
||||
for (var key in rolls) {
|
||||
|
||||
var roll = rolls[key];
|
||||
var row = jQuery("<div></div>");
|
||||
|
@ -425,7 +425,7 @@ Diceware.go = function() {
|
|||
//
|
||||
// Clone and append specific dice to this row.
|
||||
//
|
||||
for (key2 in roll.dice.roll) {
|
||||
for (var key2 in roll.dice.roll) {
|
||||
var die = roll.dice.roll[key2];
|
||||
var classname = ".source .dice" + die;
|
||||
var tmp = jQuery(classname).clone().appendTo(row);
|
||||
|
|
Loading…
Reference in a new issue