From 034f3df71ee8d8e77b380fd1d491ccb62dc71e31 Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Thu, 30 Jan 2020 18:10:12 -0500 Subject: [PATCH] publish: initial commit generated from commit 8cc1ca4c36cc6a0be07b6f757649b80419f6670f --- example/index.html | 2 -- index.html | 2 ++ index.js | 2 +- styles.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 example/index.html create mode 100644 index.html diff --git a/example/index.html b/example/index.html deleted file mode 100644 index cbd7ef6..0000000 --- a/example/index.html +++ /dev/null @@ -1,2 +0,0 @@ -Demo: monitor a Dash address
- \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..ab3b9b1 --- /dev/null +++ b/index.html @@ -0,0 +1,2 @@ +Demo: monitor a Dash address
+ \ No newline at end of file diff --git a/index.js b/index.js index 9dcdfac..98f3288 100644 --- a/index.js +++ b/index.js @@ -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 \ No newline at end of file +//# sourceMappingURL=replacethiswithadot/index.js.map \ No newline at end of file diff --git a/styles.css b/styles.css index 02128f3..77c37d8 100644 --- a/styles.css +++ b/styles.css @@ -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 */ \ No newline at end of file +/*# sourceMappingURL=replacethiswithadot/styles.css.map */ \ No newline at end of file