publish: initial commit

generated from commit 8cc1ca4c36
This commit is contained in:
Joshua Seigler 2020-01-30 18:10:12 -05:00
parent a8932536b1
commit 034f3df71e
4 changed files with 4 additions and 4 deletions

View file

@ -1,2 +0,0 @@
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Demo: monitor a Dash address</title><script src="/index.js"></script><link rel="stylesheet" href="/styles.css"></head><body> <div data-dash-address-watch="XmGw5qrhtJcmp3qebCDg9aLZH4ugraeakx"></div>
</body></html>

2
index.html Normal file
View file

@ -0,0 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Demo: monitor a Dash address</title><script src="./index.js"></script><link rel="stylesheet" href="./styles.css"></head><body> <div data-dash-address-watch="XmGw5qrhtJcmp3qebCDg9aLZH4ugraeakx"></div>
</body></html>

View file

@ -104,4 +104,4 @@ var e=require("./url"),r=require("socket.io-parser"),o=require("./manager"),t=re
},{"./url":"ECAZ","socket.io-parser":"EDhw","./manager":"Di21","debug":"jcLW","./socket":"wT76"}],"Focm":[function(require,module,exports) {
window.addEventListener("load",function(){var t,e=document.querySelectorAll("div[data-dash-address-watch]"),n=[],a={};0!==e.length?(t=require("socket.io-client").connect("https://insight.dash.org:443/"),e.forEach(function(t){var e=t.getAttribute("data-dash-address-watch"),s=document.createElement("div");s.className="dash-address-watch-status",s.textContent="Loading...";var o=document.createElement("div");o.className="dash-address-watch-label",o.textContent=e;var c=document.createElement("div");c.className="dash-address-watch-log",t.appendChild(o),t.appendChild(s),t.appendChild(c),n.push(e),a[e]={container:t,label:o,status:s,log:c}}),t.on("connect",function(){Object.values(a).forEach(function(t){t.status.textContent="Watching..."}),t.emit("subscribe","inv")}),t.on("disconnect",function(){Object.values(a).forEach(function(t){t.status.textContent="Reconnecting..."})}),t.on("tx",function(t){n.forEach(function(e){var n=t.vout.reduce(function(t,n){return t+(Object.keys(n)[0]===e?Object.values(n)[0]:0)},0);if(n>0){var s=document.createElement("a");s.setAttribute("href","https://insight.dash.org/insight/tx/"+t.txid),s.textContent="Received "+n/1e8+" DASH",a[e].log.insertBefore(s,a[e].log.firstChild)}})})):console.log("No addresses to monitor.")});
},{"socket.io-client":"gT2G"}]},{},["Focm"], null)
//# sourceMappingURL=/index.js.map
//# sourceMappingURL=replacethiswithadot/index.js.map

View file

@ -1,2 +1,2 @@
[data-dash-address-watch]{display:inline-block;border:1px solid grey;padding:1em;width:30ch;border-radius:.25em;box-shadow:.5em .5em 1.5em -.5em #000}.dash-address-watch-label{position:absolute;font-size:.75em;margin-top:-1.75em;background-color:#fff}.dash-address-watch-status{text-transform:uppercase;font-size:.75em}.dash-address-watch-log>a{display:block}
/*# sourceMappingURL=/styles.css.map */
/*# sourceMappingURL=replacethiswithadot/styles.css.map */