Update index.html
This commit is contained in:
1 parent
7ebcc3d2a6
commit
5dec0f9171
1 file changed
+22
-8
+22
-8
@@ -235,10 +235,16 @@
|
||||
sessionStorage.clear();
|
||||
const privkey = bytesToHex( cryptoUtils.Noble.utils.randomPrivateKey() );
|
||||
$( '.form' ).addEventListener( "change", async function() {
|
||||
if ( this.files[ 0 ].size < 90000 ) {
|
||||
var b64 = await encodeBase64( this );
|
||||
} else {
|
||||
alert( 'File too large, make sure it is less than 90 kilobytes' ); this.value = null;
|
||||
if ( this.files[ 0 ].size >= 120000 && this.files[ 0 ].size < 350000 ) {
|
||||
var conf = confirm( "You exceeded the 120 kb size limit. Click ok to override this warning or click cancel to try again." );
|
||||
if ( conf ) {
|
||||
var b64 = await encodeBase64( this );
|
||||
} else {
|
||||
this.value = null;
|
||||
}
|
||||
} else if ( this.files[ 0 ].size >= 350000 ) {
|
||||
alert( "You exceeded this software's hard size limit of 350 kb files. Modify the code to override the limit." )
|
||||
this.value = null;
|
||||
}
|
||||
var base64 = b64.substring( b64.indexOf( "base64," ) + 7 );
|
||||
var hex = base64ToHex( base64 );
|
||||
@@ -518,6 +524,8 @@
|
||||
});
|
||||
this.getElementsByClassName( "num" )[ 0 ].style.backgroundColor = "green";
|
||||
sessionStorage[ "feerate" ] = this.getElementsByClassName( "num" )[ 0 ].innerText;
|
||||
$( '#sats_per_byte' ).innerText = Number( this.getElementsByClassName( "num" )[ 0 ].innerText );
|
||||
$( '#sats_range' ).value = Number( this.getElementsByClassName( "num" )[ 0 ].innerText );
|
||||
}
|
||||
});
|
||||
function checkAddress() {
|
||||
@@ -534,16 +542,22 @@
|
||||
$( '.address' ).onchange = checkAddress;
|
||||
$( '.address' ).onpaste = checkAddress;
|
||||
$( '.address' ).onkeyup = checkAddress;
|
||||
async function init() {
|
||||
sessionStorage[ "bitcoin_price" ] = await getBitcoinPrice();
|
||||
async function init( num ) {
|
||||
if ( !num ) {
|
||||
var maxfee = await getMaxFeeRate();
|
||||
$( '#sats_per_byte' ).innerText = maxfee;
|
||||
$( '#sats_range' ).value = maxfee;
|
||||
}
|
||||
num = num + 1;
|
||||
var allrates = await getAllFeeRates();
|
||||
$( '.minfee .num' ).innerText = allrates[ "minimumFee" ];
|
||||
$( '.midfee .num' ).innerText = allrates[ "hourFee" ];
|
||||
$( '.maxfee .num' ).innerText = allrates[ "fastestFee" ];
|
||||
sessionStorage[ "bitcoin_price" ] = await getBitcoinPrice();
|
||||
await waitSomeSeconds( 10 );
|
||||
init();
|
||||
init( num );
|
||||
}
|
||||
init();
|
||||
init( 0 );
|
||||
</script>
|
||||
<div class="black-bg" onclick="modalVanish();"></div>
|
||||
<div class="modal"></div>
|
||||
|
||||
Reference in new issue
Block a user