Skip to content

Commit

Permalink
v2.8.1 Czech translation. Remove firstbits link. Fix mouse movement v…
Browse files Browse the repository at this point in the history
…isualization for Firefox and IE.
  • Loading branch information
pointbiz committed Jan 19, 2014
1 parent 4b01c4c commit b6fb655
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 55 deletions.
77 changes: 50 additions & 27 deletions bitaddress.org.html
Original file line number Diff line number Diff line change
Expand Up @@ -5766,6 +5766,7 @@
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; }
.right { text-align: right; }
.walletarea { display: none; border: 2px solid green; }
hr { margin: 20px 0; border-top: 2px dashed #008000; }
Expand All @@ -5789,8 +5790,8 @@
#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; border-radius: 3px; background-color: green; position: absolute; z-index: 10; }
#generate { font-family: monospace; font-size: 1.25em; height: 275px; text-align: left; position: relative; padding: 5px; border: 2px solid green; }
.seedpoint { width: 6px; height: 6px; display: block; border-radius: 3px; background-color: green; position: absolute; z-index: 10; }
#generate { font-family: monospace; font-size: 1.25em; height: 305px; text-align: left; position: relative; padding: 5px; border: 2px solid green; }
#generate span { padding: 5px 5px 0 5px; }
#generatekeyinput { position: relative; z-index: 20; }
#keyarea { height: 250px; }
Expand Down Expand Up @@ -5988,7 +5989,7 @@
<div id="generate">
<span id="generatelabelbitcoinaddress">Generating Bitcoin Address...</span><br />
<span id="generatelabelmovemouse">MOVE your mouse around to add some extra randomness... </span><span id="mousemovelimit"></span><br />
<span id="generatelabelkeypress">OR type some random characters into this textbox <input type="text" id="generatekeyinput" onkeypress="ninja.seeder.seed(event);" /></span><br />
<span id="generatelabelkeypress">OR type some random characters into this textbox</span> <input type="text" id="generatekeyinput" onkeypress="ninja.seeder.seedKeyPress(event);" /><br />
<div id="seedpooldisplay"></div>
</div>

Expand Down Expand Up @@ -6275,13 +6276,13 @@
<div class="authorbtc">
<div>
<span class="item"><span id="footerlabeldonations">Donations:</span> <b>1NiNja</b>1bUmhSoTXozBRBEtR8LeF9TGbZBN</span>
<span class="item"><a href="http://firstbits.net/1ninja" target="_blank">firstbits.net/1ninja</a></span>
<span class="item"></span>
<span class="item" id="footerlabeltranslatedby"></span>
</div>
</div>
<div class="authorpgp">
<span class="item">
<a href="pgpsignedmsg.txt" target="_blank"><span id="footerlabelversion">Version History</span> (v2.8.0)</a>
<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>
Expand Down Expand Up @@ -6649,6 +6650,10 @@
</script>
<script type="text/javascript">
ninja.seeder = {
init: (function () {
document.getElementById("generatekeyinput").value = "";
})(),

// number of mouse movements to wait for
seedLimit: (function () {
var num = Crypto.util.randomBytes(12)[11];
Expand All @@ -6662,40 +6667,52 @@
// seed function exists to wait for mouse movement to add more entropy before generating an address
seed: function (evt) {
if (!evt) var evt = window.event;
var timeStamp = new Date().getTime();
// seeding is over now we generate and display the address
if (ninja.seeder.seedCount == ninja.seeder.seedLimit) {
ninja.seeder.seedCount++;
ninja.wallets.singlewallet.open();
document.getElementById("generate").style.display = "none";
document.getElementById("menu").style.visibility = "visible";
ninja.seeder.removePoints();
}
// seed mouse position X and Y when mouse movements are greater than 40ms apart.
else if ((ninja.seeder.seedCount < ninja.seeder.seedLimit) && evt && (timeStamp - ninja.seeder.lastInputTime) > 40) {
SecureRandom.seedTime();
SecureRandom.seedInt16((evt.clientX * evt.clientY));
ninja.seeder.showPoint(evt.clientX, evt.clientY);
ninja.seeder.seedCount++;
ninja.seeder.lastInputTime = new Date().getTime();
ninja.seeder.showPool();
}
},

// seed function exists to wait for mouse movement to add more entropy before generating an address
seedKeyPress: function (evt) {
if (!evt) var evt = window.event;
// seeding is over now we generate and display the address
if (ninja.seeder.seedCount == ninja.seeder.seedLimit) {
ninja.seeder.seedCount++;
ninja.wallets.singlewallet.open();
// UI
document.getElementById("generate").style.display = "none";
document.getElementById("menu").style.visibility = "visible";
ninja.seeder.removePoints();
}
else if (ninja.seeder.seedCount < ninja.seeder.seedLimit) {
// seed key press character
else if ((ninja.seeder.seedCount < ninja.seeder.seedLimit) && evt.which) {
var timeStamp = new Date().getTime();
// seed key press character
if (evt.which) {
// seed a bunch (minimum seedLimit) of times
SecureRandom.seedTime();
SecureRandom.seedInt8(evt.which);
var keyPressTimeDiff = timeStamp - ninja.seeder.lastInputTime;
SecureRandom.seedInt8(keyPressTimeDiff);
ninja.seeder.seedCount++;
ninja.seeder.lastInputTime = new Date().getTime();
}
// seed mouse position X and Y when mouse movements are greater than 40ms apart.
else if (evt && (timeStamp - ninja.seeder.lastInputTime) > 40) {
// seed a bunch (minimum seedLimit) of times
SecureRandom.seedTime();
SecureRandom.seedInt16((evt.clientX * evt.clientY));
ninja.seeder.showPoint(evt.clientX, evt.clientY);
ninja.seeder.seedCount++;
ninja.seeder.lastInputTime = new Date().getTime();
}
document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount);
// seed a bunch (minimum seedLimit) of times
SecureRandom.seedTime();
SecureRandom.seedInt8(evt.which);
var keyPressTimeDiff = timeStamp - ninja.seeder.lastInputTime;
SecureRandom.seedInt8(keyPressTimeDiff);
ninja.seeder.seedCount++;
ninja.seeder.lastInputTime = new Date().getTime();
ninja.seeder.showPool();
}
},

showPool: function () {
var poolHex;
if (SecureRandom.poolCopyOnInit != null) {
poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit);
Expand All @@ -6707,6 +6724,7 @@
document.getElementById("seedpool").innerHTML = poolHex;
document.getElementById("seedpooldisplay").innerHTML = poolHex;
}
document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount);
},

showPoint: function (x, y) {
Expand Down Expand Up @@ -6950,6 +6968,7 @@
"tagline": "Generador de carteras Bitcoin de código abierto en lado de cliente con Javascript",
"generatelabelbitcoinaddress": "Generando dirección Bitcoin...",
"generatelabelmovemouse": "Mueve un poco el ratón para crear entropía...",
"generatelabelkeypress": "OR type some random characters into this textbox", //TODO: please translate
"singlewallet": "Una sola cartera",
"paperwallet": "Cartera en papel",
"bulkwallet": "Direcciones en masa",
Expand Down Expand Up @@ -7083,6 +7102,7 @@
"tagline": "Générateur De Porte-Monnaie Bitcoin Javascript Hors-Ligne",
"generatelabelbitcoinaddress": "Création de l'adresse Bitcoin...",
"generatelabelmovemouse": "BOUGEZ votre souris pour ajouter de l'entropie...",
"generatelabelkeypress": "OR type some random characters into this textbox", //TODO: please translate
"singlewallet": "Porte-Monnaie Simple",
"paperwallet": "Porte-Monnaie Papier",
"bulkwallet": "Porte-Monnaie En Vrac",
Expand Down Expand Up @@ -7216,6 +7236,7 @@
"tagline": "Δημιουργός Διευθύνσεων Bitcoin, ανοικτού κώδικα Javascript",
"generatelabelbitcoinaddress": "Δημιουργία Διεύθυνσης Bitcoin...",
"generatelabelmovemouse": "ΚΟΥΝΗΣΤΕ το ποντίκι τριγύρω για να προσθέσετε επιπλέον τυχαιότητα...",
"generatelabelkeypress": "OR type some random characters into this textbox", //TODO: please translate
"singlewallet": "Απλό Πορτοφόλι",
"paperwallet": "Χάρτινο Πορτοφόλι",
"bulkwallet": "Πολλαπλά Πορτοφόλια",
Expand Down Expand Up @@ -7349,6 +7370,7 @@
"tagline": "Open Source JavaScript Client-Side Bitcoin Wallet Generator",
"generatelabelbitcoinaddress": "Generazione Indirizzo Bitcoin...",
"generatelabelmovemouse": "MUOVI il tuo mouse per contribuire alla generazione dei numeri casuali...",
"generatelabelkeypress": "OR type some random characters into this textbox", //TODO: please translate
"singlewallet": "Singolo portafoglio",
"paperwallet": "Paper Wallet",
"bulkwallet": "Portafogli multipli",
Expand Down Expand Up @@ -7483,6 +7505,7 @@
"tagline": "Offener, client-seitiger Bitcoin-Wallet-Generator in JavaScript",
"generatelabelbitcoinaddress": "Erstelle Bitcoin-Wallet...",
"generatelabelmovemouse": "Bewege deine Maus umher, um die Zuf&auml;lligkeit zu erh&ouml;hen...",
"generatelabelkeypress": "OR type some random characters into this textbox", //TODO: please translate
"singlewallet": "Einzelnes Wallet",
"paperwallet": "Papier-Wallet",
"bulkwallet": "Massen-Wallet",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitaddress.org",
"version": "2.8.0",
"version": "2.8.1",
"description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator",
"main": "Gruntfile.js",
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/bitaddress-ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<div id="generate">
<span id="generatelabelbitcoinaddress">Generating Bitcoin Address...</span><br />
<span id="generatelabelmovemouse">MOVE your mouse around to add some extra randomness... </span><span id="mousemovelimit"></span><br />
<span id="generatelabelkeypress">OR type some random characters into this textbox <input type="text" id="generatekeyinput" onkeypress="ninja.seeder.seed(event);" /></span><br />
<span id="generatelabelkeypress">OR type some random characters into this textbox</span> <input type="text" id="generatekeyinput" onkeypress="ninja.seeder.seedKeyPress(event);" /><br />
<div id="seedpooldisplay"></div>
</div>

Expand Down Expand Up @@ -425,13 +425,13 @@
<div class="authorbtc">
<div>
<span class="item"><span id="footerlabeldonations">Donations:</span> <b>1NiNja</b>1bUmhSoTXozBRBEtR8LeF9TGbZBN</span>
<span class="item"><a href="http://firstbits.net/1ninja" target="_blank">firstbits.net/1ninja</a></span>
<span class="item"></span>
<span class="item" id="footerlabeltranslatedby"></span>
</div>
</div>
<div class="authorpgp">
<span class="item">
<a href="pgpsignedmsg.txt" target="_blank"><span id="footerlabelversion">Version History</span> (v2.8.0)</a>
<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>
Expand Down
5 changes: 3 additions & 2 deletions src/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 39 additions & 22 deletions src/ninja.misc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
ninja.seeder = {
init: (function () {
document.getElementById("generatekeyinput").value = "";
})(),

// number of mouse movements to wait for
seedLimit: (function () {
var num = Crypto.util.randomBytes(12)[11];
Expand All @@ -12,40 +16,52 @@ ninja.seeder = {
// seed function exists to wait for mouse movement to add more entropy before generating an address
seed: function (evt) {
if (!evt) var evt = window.event;
var timeStamp = new Date().getTime();
// seeding is over now we generate and display the address
if (ninja.seeder.seedCount == ninja.seeder.seedLimit) {
ninja.seeder.seedCount++;
ninja.wallets.singlewallet.open();
document.getElementById("generate").style.display = "none";
document.getElementById("menu").style.visibility = "visible";
ninja.seeder.removePoints();
}
// seed mouse position X and Y when mouse movements are greater than 40ms apart.
else if ((ninja.seeder.seedCount < ninja.seeder.seedLimit) && evt && (timeStamp - ninja.seeder.lastInputTime) > 40) {
SecureRandom.seedTime();
SecureRandom.seedInt16((evt.clientX * evt.clientY));
ninja.seeder.showPoint(evt.clientX, evt.clientY);
ninja.seeder.seedCount++;
ninja.seeder.lastInputTime = new Date().getTime();
ninja.seeder.showPool();
}
},

// seed function exists to wait for mouse movement to add more entropy before generating an address
seedKeyPress: function (evt) {
if (!evt) var evt = window.event;
// seeding is over now we generate and display the address
if (ninja.seeder.seedCount == ninja.seeder.seedLimit) {
ninja.seeder.seedCount++;
ninja.wallets.singlewallet.open();
// UI
document.getElementById("generate").style.display = "none";
document.getElementById("menu").style.visibility = "visible";
ninja.seeder.removePoints();
}
else if (ninja.seeder.seedCount < ninja.seeder.seedLimit) {
// seed key press character
else if ((ninja.seeder.seedCount < ninja.seeder.seedLimit) && evt.which) {
var timeStamp = new Date().getTime();
// seed key press character
if (evt.which) {
// seed a bunch (minimum seedLimit) of times
SecureRandom.seedTime();
SecureRandom.seedInt8(evt.which);
var keyPressTimeDiff = timeStamp - ninja.seeder.lastInputTime;
SecureRandom.seedInt8(keyPressTimeDiff);
ninja.seeder.seedCount++;
ninja.seeder.lastInputTime = new Date().getTime();
}
// seed mouse position X and Y when mouse movements are greater than 40ms apart.
else if (evt && (timeStamp - ninja.seeder.lastInputTime) > 40) {
// seed a bunch (minimum seedLimit) of times
SecureRandom.seedTime();
SecureRandom.seedInt16((evt.clientX * evt.clientY));
ninja.seeder.showPoint(evt.clientX, evt.clientY);
ninja.seeder.seedCount++;
ninja.seeder.lastInputTime = new Date().getTime();
}
document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount);
// seed a bunch (minimum seedLimit) of times
SecureRandom.seedTime();
SecureRandom.seedInt8(evt.which);
var keyPressTimeDiff = timeStamp - ninja.seeder.lastInputTime;
SecureRandom.seedInt8(keyPressTimeDiff);
ninja.seeder.seedCount++;
ninja.seeder.lastInputTime = new Date().getTime();
ninja.seeder.showPool();
}
},

showPool: function () {
var poolHex;
if (SecureRandom.poolCopyOnInit != null) {
poolHex = Crypto.util.bytesToHex(SecureRandom.poolCopyOnInit);
Expand All @@ -57,6 +73,7 @@ ninja.seeder = {
document.getElementById("seedpool").innerHTML = poolHex;
document.getElementById("seedpooldisplay").innerHTML = poolHex;
}
document.getElementById("mousemovelimit").innerHTML = (ninja.seeder.seedLimit - ninja.seeder.seedCount);
},

showPoint: function (x, y) {
Expand Down
Loading

0 comments on commit b6fb655

Please sign in to comment.