From: Ian Coleman Date: Thu, 15 Dec 2016 00:51:24 +0000 (+1100) Subject: Warnings and QR changes compiled into standalone. X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=52da415f0385a6a89070498d14259aed980f989b Warnings and QR changes compiled into standalone. --- diff --git a/bip39-standalone.html b/bip39-standalone.html index 0fd48c4..0f7d7d0 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html @@ -96,8 +96,15 @@ .qr-image { margin: 5px; } - .qr-hint { + .qr-hint, + .qr-warning { padding: 2px; + max-width: 150px; + } + .more-info { + cursor: help; + border-bottom: 1px dashed #000; + text-decoration: none; } @@ -169,7 +176,7 @@
- +
@@ -526,6 +533,12 @@

You are not a good source of entropy.

+

License

+

+ Please refer to the software license for more detail. + +

+

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

@@ -614,9 +627,12 @@
@@ -14702,7 +14718,8 @@ sjcl.hash.sha256.prototype = { // //
Test
//
keep em tag
-// +// +// // // Obtain all the phrases to be translated via js debug console: // @@ -14717,7 +14734,8 @@ sjcl.hash.sha256.prototype = { // Translate.loadForeignPhrases("es", { // "Test": "Test in Spanish", // "keep em tag": "keep em tag in Spanish", -// "Example text": "Example text in Spanish" +// "Example placeholder": "Example placeholder in Spanish" +// "Example title": "Example title in Spanish" // }); // // In your UI put a listener for clicking on the Spanish button: @@ -14768,10 +14786,21 @@ Translate = new (function() { }, } + var title = { + selector: "[data-translate-title]", + getKey: function() { + return this.getAttribute("title").trim().replace(/\s+/g, " "); + }, + setPhrase: function(p) { + this.setAttribute("title", p); + }, + } + // Get elements to be translated var allEls = getEls(text) .concat(getEls(html)) - .concat(getEls(placeholder)); + .concat(getEls(placeholder)) + .concat(getEls(title)); // Provides access to phrases from a non-default language. // See phrases_en.js for example usage. @@ -18624,7 +18653,7 @@ window.Entropy = new (function() { var showAddress = true; var showPubKey = true; var showPrivKey = true; - var showQr = true; + var showQr = false; var entropyChangeTimeoutEvent = null; var phraseChangeTimeoutEvent = null; @@ -18678,6 +18707,7 @@ window.Entropy = new (function() { DOM.privateKeyToggle = $(".private-key-toggle"); DOM.languages = $(".languages a"); DOM.qrContainer = $(".qr-container"); + DOM.qrHider = DOM.qrContainer.find(".qr-hider"); DOM.qrImage = DOM.qrContainer.find(".qr-image"); DOM.qrHint = DOM.qrContainer.find(".qr-hint"); DOM.showQrEls = $("[data-show-qr]"); @@ -19557,7 +19587,10 @@ window.Entropy = new (function() { var size = 130; DOM.qrImage.qrcode({width: size, height: size, text: content}); if (!showQr) { - DOM.qrImage.addClass("hidden"); + DOM.qrHider.addClass("hidden"); + } + else { + DOM.qrHider.removeClass("hidden"); } DOM.qrContainer.removeClass("hidden"); } @@ -19570,7 +19603,7 @@ window.Entropy = new (function() { function toggleQr() { showQr = !showQr; - DOM.qrImage.toggleClass("hidden"); + DOM.qrHider.toggleClass("hidden"); DOM.qrHint.toggleClass("hidden"); }