diff --git a/index.html b/index.html index 0c6b1f1..f009c11 100644 --- a/index.html +++ b/index.html @@ -1,165 +1,148 @@ - - - - - Inscribe the planet - - - - - - - - + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ +

Inscribe the Planet

+
+ +
- async function getBitcoinPrice() { - var prices = []; - var cbprice = await getBitcoinPriceFromCoinbase(); - var kprice = await getBitcoinPriceFromKraken(); - var cdprice = await getBitcoinPriceFromCoindesk(); - var gprice = await getBitcoinPriceFromGemini(); - var bprice = await getBitcoinPriceFromBybit(); - prices.push( Number( cbprice ), Number( kprice ), Number( cdprice ), Number( gprice ), Number( bprice ) ); - prices.sort(); - return prices[ 2 ]; - } - - - -

Welcome to the online inscriber

-

This tool may not work in safari browser. If you are using that, consider switching.

-

First enter a taproot address from an ordinal wallet

-

-

Then upload a file you want that address to own or click here to register a domain name

-
-

-

-

61

-

Select a feerate (measured in sats per byte)

-
...
Min
...
Mid
...
Max
-
-

Sats per byte: 1

-
- -
-

-
- - + +
+ + +
+
+
+ + +
+
+ + +
+ + + +
+
+ + + + -
- - + await sleep(1000); + } + + if(inscribed_already.length != 0) + { + alert("The following files are inscribed already: " + inscribed_already.join(', ')); + } + + if(errors.length != 0) + { + alert("Could not check the following files due to an error: " + inscribed_already.join(', ')); + } + + if(inscribed_already.length == 0) + { + alert("Your files seem not to be inscribed yet."); + } + + $('#bytes_checker').innerHTML = 'Check if file(s) are inscribed already'; + } + + async function init( num ) { + if ( !num ) { + let isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + if ( isSafari ) $( '.safari_warning' ).style.display = "block"; + let minfee = await getMinFeeRate(); + $( '#sats_per_byte' ).innerText = minfee; + $( '#sats_range' ).value = minfee; + } + num = num + 1; + let allrates = await getAllFeeRates(); + $( '.minfee .num' ).innerText = allrates[ "minimumFee" ]; + $( '.midfee .num' ).innerText = allrates[ "hourFee" ]; + $( '.maxfee .num' ).innerText = allrates[ "fastestFee" ]; + let isgreen; + $$( '.fee .num' ).forEach( function( item ) { + if ( item.style.backgroundColor == "green" || getComputedStyle( item ).backgroundColor == "rgb(0, 128, 0)" ) isgreen = item; + }); + if ( isgreen ) { + $( '#sats_per_byte' ).innerText = Number( isgreen.innerText ); + $( '#sats_range' ).value = Number( isgreen.innerText ); + sessionStorage[ "feerate" ] = isgreen.innerText; + } + sessionStorage[ "bitcoin_price" ] = await getBitcoinPrice(); + await waitSomeSeconds( 10 ); + init( num ); + } + init( 0 ); + +
+ + + + + +