From 8c99d6bc8d0c14fd5fa93b9aafc5a397253d75cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= <batolettre@gmail.com> Date: Mon, 10 Mar 2014 21:10:58 +0100 Subject: [PATCH] fix javascript fart --- bitaddress.org.html | 45 +++++++++++++++++++------------------- src/bitcoinjs-lib.eckey.js | 4 ++-- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/bitaddress.org.html b/bitaddress.org.html index 8fe5c2c..89227ba 100644 --- a/bitaddress.org.html +++ b/bitaddress.org.html @@ -5318,13 +5318,13 @@ Bitcoin.ECKey = (function () { // 51 characters base58, always starts with a '5' ECKey.isWalletImportFormat = function (key) { key = key.toString(); - return janin.selectedCurrency.WIF_RegExtest(key); + return janin.currency.WIF_RegEx().test(key); }; // 52 characters base58 ECKey.isCompressedWalletImportFormat = function (key) { key = key.toString(); - return janin.selectedCurrency.CWIF_RegExtest(key); + return janin.currency.CWIF_RegEx().test(key); }; // 44 characters @@ -5762,7 +5762,7 @@ Bitcoin.Util = { no-repeat left center; width: 17px; height: 17px; display: inline-block; float: right; } .less { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDEvMDIvMTLltnQyAAABuklEQVQ4ja2US25TQRBFT336OSEY5ESyBfEakNiLt0AW5S2QvQQxAiZIYBwSz/yByH7dxcB2bPMME+hJS/W5fetWVUtE8K/HfzdcXfdfqsr4onuGuRz4Jrdzcg6Gg9HfQYAxAqmlSMMlQJO5/oliE4AtQLcR++btZQ+wPVsvVXbTfXFGEMyWU9rVM0yMu/Gc5bJ+DdztxWcH3otKVzbPmyq5LnwfzSgEBMxlhqJEBFWVKKUgG66rur53oH7aOeWkUlJSRCBHZracssorlLXttHpCpzonaYukjmsiivDu08daAZIJ7oLIVg9BUQgQUVwSua5Z5AWmiqnj6pisVXAAU0F1J6WK0q6e024Fs4cplbXonFxgapisk00MkdiBqDd7oSKoOiqGmZHMSZrwPRYHIMfaKaKsyhI01oni6IaFYptSyiOIT27nOwaq5FyQrUAIC/nBhK+UErRSos55z4878CrneJyTnHOvquymf3mOb+hvy/jw+QuLh5/NORkORvsGrq77dc6xpr0RcH07y3oF8G04GN0f6HdEDhdA1XG1vXb6dsAa+3Z8AREiQwkoEeQoiBzocHDkf/wnvwC5IpRVsUDNUgAAAABJRU5ErkJggg==) no-repeat left center; width: 17px; height: 17px; display: inline-block; float: right; } -a { position: relative; z-index: 20; text-decoration: none; } +a { position: relative; z-index: 20; text-decoration: none; color: #d58424; } .right { text-align: right; } .walletarea { display: none; border: 1px solid #BFBFBF; background-color: white; } hr { margin: 20px 0; border-top: 1px dashed #008000; } @@ -5775,7 +5775,7 @@ hr { margin: 20px 0; border-top: 1px dashed #008000; } .keyarea .qrcode_public { display: inline-block; float: left; } .keyarea .qrcode_private { display: inline-block; position: relative; top: 28px; float: right; } .pubkeyhex { word-wrap: break-word; } -body { font-family: Arial; background: #F5F5F5; } +body { font-family: Arial; background-image: url('images/diamonds.png'); } .faqs ol { padding: 0 0 0 25px; } .faqs li { padding: 3px 0; } .question { padding: 10px 15px; text-align: left; cursor: pointer; } @@ -5786,7 +5786,7 @@ body { font-family: Arial; background: #F5F5F5; } #btcaddress, #btcprivwif, #detailaddress, #detailaddresscomp, #detailprivwif, #detailprivwifcomp { font-family: monospace; font-size: 1.25em; } #seedpoolarea { display: none; } #seedpooldisplay { font-family: monospace; font-size: 1em; width: 640px; padding: 15px 5px; word-wrap: break-word; } -.seedpoint { width: 6px; height: 6px; display: block; border-radius: 3px; background-color: #699FF5; position: absolute; z-index: 10; } +.seedpoint { width: 6px; height: 6px; display: block; border-radius: 3px; background-color: #80CF80; position: absolute; z-index: 10; } #generate { font-family: monospace; font-size: 1.25em; height: 305px; text-align: left; position: relative; padding: 5px; border: 1px solid #BFBFBF; background-color: white; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; } #generate span { padding: 5px 5px 0 5px; } #generatekeyinput { position: relative; z-index: 20; } @@ -5876,8 +5876,10 @@ body { font-family: Arial; background: #F5F5F5; } .hide { display: none; } .show { display: block; } -#currencyddl { margin: 20px; } -.banner { font-size: 46px; text-shadow: 1px 1px 3px #000; color: #FF9547; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); } +#currencyddl { margin: 20px; position: absolute; right: 0; top: 60px; width: 320px; font-size: 14px; } +#currencyddl select { font-size: 14px; } + +.banner { font-size: 46px; text-shadow: 1px 1px 3px #000; color: #FF9547; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); text-align: left; } #donatearea { text-align: left; padding: 15px; } #donatearea .address { font-family: 'Courier New', Courier, monospace; } @@ -5889,11 +5891,11 @@ body { font-family: Arial; background: #F5F5F5; } @media screen { - #tagline { margin: 0 0 15px 0; font-style: italic; } + #tagline { margin: 0 0 15px 0; font-style: italic; text-align: left; } .menu { text-align: left; } .menu .tab { border-top-left-radius: 5px; border-top-right-radius: 5px; display: inline-block; background-color: #F5F5F5; border: 1px solid #BFBFBF; padding: 5px; margin: 0 2px 0 0; position: relative; top: 1px; z-index: 110; cursor: pointer; } - .menu .tab:hover { color: #FFF; } + .menu .tab:hover { color: #d58424; } .menu .tab.selected { background-color: #FFF; border-bottom: 1px solid #FFF; cursor: default; } .menu .tab.selected:hover { color: #000; } .pagebreak { height: 50px; } @@ -5967,15 +5969,20 @@ body { font-family: Arial; background: #F5F5F5; } <span><a href="?culture=de" id="culturede">Deutsch</a></span> | <span><a href="?culture=cs" id="culturecs">Česky</a></span> </div> - <div class="banner">WalletGenerator.net</div> + + <div class="banner"> + <img src="images/banner.png" alt="banner" /> + </div> + + <div id="currencyddl" class="hide"> + Choose currency : + <select id="currency" onchange="janin.currency.useCurrency(this);"></select> + </div> - <div id="tagline">Open Source JavaScript Client-Side Universal Wallet Generator</div> <div id="seedpoolarea"><textarea rows="16" cols="62" id="seedpool"></textarea></div> <div id="testnet"></div> - <div id="currencyddl" class="hide"> - <select id="currency" onchange="janin.currency.useCurrency(this);"></select> - </div> + <div class="menu" id="menu"> <div class="tab selected" id="singlewallet" onclick="ninja.tabSwitch(this);">Single Wallet</div> @@ -6286,18 +6293,12 @@ body { font-family: Arial; background: #F5F5F5; } <!-- Insert content here :D --> </div> </div> - <div class="authorpgp"> - <span class="item"> - <a href="pgpsignedmsg.txt" target="_blank"><span id="footerlabelversion">Version History</span> (v2.8.1)</a> - (<a href="ninja_bitaddress.org.txt" target="_blank" id="footerlabelpgp">PGP</a>) - </span> - <span class="item">527B 5C82 B1F6 B2DB 72A0<br />ECBF 8749 7B91 6397 4F5A</span> - <span class="item"><a href="https://github.com/pointbiz/bitaddress.org" target="_blank" id="footerlabelgithub">GitHub Repository</a></span> - </div> + <div class="copyright"> <span id="footerlabelcopyright1">Copyright bitaddress.org.</span> <span id="footerlabelcopyright2">JavaScript copyrights are included in the source.</span> <span id="footerlabelnowarranty">No warranty.</span> + <span class="item"><a href="https://github.com/MichaelMure/PaperWallet" target="_blank" id="footerlabelgithub">GitHub Repository</a></span> </div> </div> </div> diff --git a/src/bitcoinjs-lib.eckey.js b/src/bitcoinjs-lib.eckey.js index 42a3a08..99e479d 100644 --- a/src/bitcoinjs-lib.eckey.js +++ b/src/bitcoinjs-lib.eckey.js @@ -230,13 +230,13 @@ Bitcoin.ECKey = (function () { // 51 characters base58, always starts with a '5' ECKey.isWalletImportFormat = function (key) { key = key.toString(); - return janin.selectedCurrency.WIF_RegExtest(key); + return janin.currency.WIF_RegEx().test(key); }; // 52 characters base58 ECKey.isCompressedWalletImportFormat = function (key) { key = key.toString(); - return janin.selectedCurrency.CWIF_RegExtest(key); + return janin.currency.CWIF_RegEx().test(key); }; // 44 characters