dynamic html title depending on selected currency
This commit is contained in:
parent
49f1f54869
commit
67c6aedc1c
2 changed files with 8 additions and 2 deletions
|
@ -6658,9 +6658,12 @@ janin.currency = {
|
||||||
useCurrency: function(index) {
|
useCurrency: function(index) {
|
||||||
janin.selectedCurrency = janin.currencies[index];
|
janin.selectedCurrency = janin.currencies[index];
|
||||||
|
|
||||||
var coinImgUrl = "logos/" + janin.selectedCurrency.name.toLowerCase() + ".png";
|
var coinImgUrl = "logos/" + janin.currency.name().toLowerCase() + ".png";
|
||||||
document.getElementById("coinLogoImg").src = coinImgUrl;
|
document.getElementById("coinLogoImg").src = coinImgUrl;
|
||||||
|
|
||||||
|
// Update title depending on currency
|
||||||
|
document.title = janin.currency.name() + "'s paper wallet generator";
|
||||||
|
|
||||||
// Regenerate a new wallet when not expensive
|
// Regenerate a new wallet when not expensive
|
||||||
ninja.wallets.singlewallet.generateNewAddressAndKey();
|
ninja.wallets.singlewallet.generateNewAddressAndKey();
|
||||||
ninja.wallets.paperwallet.build(document.getElementById('paperpassphrase').value);
|
ninja.wallets.paperwallet.build(document.getElementById('paperpassphrase').value);
|
||||||
|
|
|
@ -36,9 +36,12 @@ janin.currency = {
|
||||||
useCurrency: function(index) {
|
useCurrency: function(index) {
|
||||||
janin.selectedCurrency = janin.currencies[index];
|
janin.selectedCurrency = janin.currencies[index];
|
||||||
|
|
||||||
var coinImgUrl = "logos/" + janin.selectedCurrency.name.toLowerCase() + ".png";
|
var coinImgUrl = "logos/" + janin.currency.name().toLowerCase() + ".png";
|
||||||
document.getElementById("coinLogoImg").src = coinImgUrl;
|
document.getElementById("coinLogoImg").src = coinImgUrl;
|
||||||
|
|
||||||
|
// Update title depending on currency
|
||||||
|
document.title = janin.currency.name() + "'s paper wallet generator";
|
||||||
|
|
||||||
// Regenerate a new wallet when not expensive
|
// Regenerate a new wallet when not expensive
|
||||||
ninja.wallets.singlewallet.generateNewAddressAndKey();
|
ninja.wallets.singlewallet.generateNewAddressAndKey();
|
||||||
ninja.wallets.paperwallet.build(document.getElementById('paperpassphrase').value);
|
ninja.wallets.paperwallet.build(document.getElementById('paperpassphrase').value);
|
||||||
|
|
Loading…
Add table
Reference in a new issue