add a donate tab with auto generated content
This commit is contained in:
parent
66248e45e5
commit
ff5fdb81d6
7 changed files with 83 additions and 25 deletions
|
@ -35,6 +35,7 @@ module.exports = function (grunt) {
|
||||||
{ token: "//ninja.brainwallet.js", file: "./src/ninja.brainwallet.js" },
|
{ token: "//ninja.brainwallet.js", file: "./src/ninja.brainwallet.js" },
|
||||||
{ token: "//ninja.vanitywallet.js", file: "./src/ninja.vanitywallet.js" },
|
{ token: "//ninja.vanitywallet.js", file: "./src/ninja.vanitywallet.js" },
|
||||||
{ token: "//ninja.detailwallet.js", file: "./src/ninja.detailwallet.js" },
|
{ token: "//ninja.detailwallet.js", file: "./src/ninja.detailwallet.js" },
|
||||||
|
{ token: "//ninja.donatetab.js", file: "./src/ninja.donatetab.js" },
|
||||||
{ token: "//qrcode.js", file: "./src/qrcode.js" },
|
{ token: "//qrcode.js", file: "./src/qrcode.js" },
|
||||||
{ token: "//securerandom.js", file: "./src/securerandom.js" },
|
{ token: "//securerandom.js", file: "./src/securerandom.js" },
|
||||||
{ token: "//janin.currency.js", file: "./src/janin.currency.js" },
|
{ token: "//janin.currency.js", file: "./src/janin.currency.js" },
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -139,6 +139,7 @@
|
||||||
<div class="tab" id="brainwallet" onclick="ninja.tabSwitch(this);">Brain Wallet</div>
|
<div class="tab" id="brainwallet" onclick="ninja.tabSwitch(this);">Brain Wallet</div>
|
||||||
<div class="tab" id="vanitywallet" onclick="ninja.tabSwitch(this);">Vanity Wallet</div>
|
<div class="tab" id="vanitywallet" onclick="ninja.tabSwitch(this);">Vanity Wallet</div>
|
||||||
<div class="tab" id="detailwallet" onclick="ninja.tabSwitch(this);">Wallet Details</div>
|
<div class="tab" id="detailwallet" onclick="ninja.tabSwitch(this);">Wallet Details</div>
|
||||||
|
<div class="tab" id="donate" onclick="ninja.tabSwitch(this);">Donate</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="generate">
|
<div id="generate">
|
||||||
|
@ -425,7 +426,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div id="donatearea" class="walletarea">
|
||||||
|
<div>To support the development of this wallet generator, you can donate to the following address:</div>
|
||||||
|
<div id="donatelist"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="footer" class="footer">
|
<div id="footer" class="footer">
|
||||||
<div class="authorbtc">
|
<div class="authorbtc">
|
||||||
|
@ -479,6 +485,9 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//ninja.detailwallet.js
|
//ninja.detailwallet.js
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
//ninja.donatetab.js
|
||||||
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//ninja.unittests.js
|
//ninja.unittests.js
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
var janin = {};
|
var janin = {};
|
||||||
|
|
||||||
janin.currency = {
|
janin.currency = {
|
||||||
createCurrency: function (name, networkVersion, privateKeyPrefix, WIF_Start, CWIF_Start) {
|
createCurrency: function (name, networkVersion, privateKeyPrefix, WIF_Start, CWIF_Start, donate) {
|
||||||
var currency = {};
|
var currency = {};
|
||||||
currency.name = name;
|
currency.name = name;
|
||||||
currency.networkVersion = networkVersion;
|
currency.networkVersion = networkVersion;
|
||||||
currency.privateKeyPrefix = privateKeyPrefix;
|
currency.privateKeyPrefix = privateKeyPrefix;
|
||||||
currency.WIF_Start = WIF_Start;
|
currency.WIF_Start = WIF_Start;
|
||||||
currency.CWIF_Start = CWIF_Start;
|
currency.CWIF_Start = CWIF_Start;
|
||||||
|
currency.donate = donate;
|
||||||
return currency;
|
return currency;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -40,14 +41,14 @@ janin.currency = {
|
||||||
};
|
};
|
||||||
|
|
||||||
janin.currencies = [
|
janin.currencies = [
|
||||||
janin.currency.createCurrency ("Bitcoin", 0x00, 0x80, "5", "[LK]"),
|
janin.currency.createCurrency ("Bitcoin", 0x00, 0x80, "5", "[LK]" , "addr1"),
|
||||||
janin.currency.createCurrency ("Dogecoin", 0x1e, 0x9e, "6", "T"),
|
janin.currency.createCurrency ("Dogecoin", 0x1e, 0x9e, "6", "T" , "addr2"),
|
||||||
janin.currency.createCurrency ("Litecoin", 0x30, 0xb0, "6", "T"),
|
janin.currency.createCurrency ("Litecoin", 0x30, 0xb0, "6", "T" , "addr3"),
|
||||||
janin.currency.createCurrency ("Peercoin", 0x37, 0xb7, "7", "[LK]"),
|
janin.currency.createCurrency ("Peercoin", 0x37, 0xb7, "7", "[LK]" , "addr4"),
|
||||||
janin.currency.createCurrency ("Auroracoin", 0x17, 0x97, "6", "T"),
|
janin.currency.createCurrency ("Auroracoin", 0x17, 0x97, "6", "T" , "addr5"),
|
||||||
janin.currency.createCurrency ("BBQcoin", 0x55, 0xd5, "6", "T"),
|
janin.currency.createCurrency ("BBQcoin", 0x55, 0xd5, "6", "T" , "addr6"),
|
||||||
janin.currency.createCurrency ("Catcoin", 0x15, 0x95, "[56]", "P"),
|
janin.currency.createCurrency ("Catcoin", 0x15, 0x95, "[56]", "P" , "addr7"),
|
||||||
janin.currency.createCurrency ("Marscoin", 0x32, 0xb2, "6", "T"),
|
janin.currency.createCurrency ("Marscoin", 0x32, 0xb2, "6", "T" , "addr8"),
|
||||||
];
|
];
|
||||||
|
|
||||||
janin.selectedCurrency = janin.currencies[0];
|
janin.selectedCurrency = janin.currencies[0];
|
||||||
|
|
|
@ -117,8 +117,10 @@ body { font-family: Arial; background: #F5F5F5; }
|
||||||
.show { display: block; }
|
.show { display: block; }
|
||||||
|
|
||||||
#currencyddl { margin: 20px; }
|
#currencyddl { margin: 20px; }
|
||||||
#walletType { }
|
|
||||||
.banner { font-size: 46px; text-shadow: 1px 1px 3px #000; color: #FF9547; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); }
|
.banner { font-size: 46px; text-shadow: 1px 1px 3px #000; color: #FF9547; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); }
|
||||||
|
|
||||||
|
#donatearea { text-align: left; padding: 15px; }
|
||||||
|
#donatearea .address { font-family: 'Courier New', Courier, monospace; }
|
||||||
|
|
||||||
/* IE8 */
|
/* IE8 */
|
||||||
.qrcodetable { border-width: 0px; border-style: none; border-color: #0000ff; border-collapse: collapse; }
|
.qrcodetable { border-width: 0px; border-style: none; border-color: #0000ff; border-collapse: collapse; }
|
||||||
|
|
9
src/ninja.donatetab.js
Normal file
9
src/ninja.donatetab.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
ninja.wallets.donate = {
|
||||||
|
open: function () {
|
||||||
|
document.getElementById("donatearea").style.display = "block";
|
||||||
|
},
|
||||||
|
|
||||||
|
close: function () {
|
||||||
|
document.getElementById("donatearea").style.display = "none";
|
||||||
|
}
|
||||||
|
};
|
|
@ -21,3 +21,11 @@ for(i = 0; i < janin.currencies.length; i++) {
|
||||||
options += "<option value='"+i+"'>"+janin.currencies[i].name+"</option>";
|
options += "<option value='"+i+"'>"+janin.currencies[i].name+"</option>";
|
||||||
}
|
}
|
||||||
select.innerHTML = options;
|
select.innerHTML = options;
|
||||||
|
// populate donate list
|
||||||
|
var donatelist = document.getElementById("donatelist");
|
||||||
|
var list = "<table>";
|
||||||
|
for(i = 0; i < janin.currencies.length; i++) {
|
||||||
|
list += "<tr><td>"+janin.currencies[i].name+"</td><td class='address'>"+janin.currencies[i].donate+"</td></tr>";
|
||||||
|
}
|
||||||
|
list += "</table>";
|
||||||
|
donatelist.innerHTML = list;
|
Loading…
Add table
Reference in a new issue