mirror of
https://github.com/dmuth/diceware.git
synced 2024-11-24 09:46:30 -05:00
Added in <wbr> tags prior to merging in #12.
This commit is contained in:
parent
da7911b62d
commit
bbe467fd37
1 changed files with 12 additions and 2 deletions
14
src/index.js
14
src/index.js
|
@ -268,8 +268,18 @@ Diceware.rollDiceHanlderPost = function(rolls, passphrase, num_passwords) {
|
|||
// represent each die.
|
||||
//
|
||||
jQuery(".results_words_value").html(passphrase.join(" "));
|
||||
jQuery(".results_phrase_value").html(passphrase.join(""));
|
||||
jQuery(".results_num_possible_value").html(num_passwords.toLocaleString("en"));
|
||||
//
|
||||
// Separate words in the phrase by "Word Break Opportunity"
|
||||
// tag so they will wrap properly on a narrow/mobile screen.
|
||||
//
|
||||
jQuery(".results_phrase_value").html(passphrase.join("<wbr>"));
|
||||
//
|
||||
// Convert the number of passwords to something based on the
|
||||
// locale and then add in <wbr> tags so they too will wrap.
|
||||
//
|
||||
num_passwords_html = num_passwords.toLocaleString("en");
|
||||
num_passwords_html = num_passwords_html.replace(/,/g, ",<wbr>");
|
||||
jQuery(".results_num_possible_value").html(num_passwords_html);
|
||||
|
||||
var rows = new Array();
|
||||
for (var key in rolls) {
|
||||
|
|
Loading…
Reference in a new issue