diff --git a/manifest.json b/manifest.json index 2aaccea..8cb3628 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "author": "https://github.com/cookie0o", "name": "miner-viewer", "description": "miner-viewer addon for https://cookie0o.github.io/miner-viewer/", - "version": "1.0", + "version": "1.1.1", "action": { "default_popup": "index.html", "default_icon": { diff --git a/payments.css b/payments.css new file mode 100644 index 0000000..fc7acc3 --- /dev/null +++ b/payments.css @@ -0,0 +1,109 @@ +.payment-block { + margin-top: 10px; + width: 100%; + height: 90px; + background-color: var(--primary); + + border-radius: 10px; + gap: 10px; + } + .payment-block .header1-container { + display: inline-flex; + justify-content: space-between; + height: 10px; + } + .payment-block .header1-container p { + color: var(--secondary); + font-size: 16px; + font-weight: bolder; + + padding: 22px; + padding-top: 1px; + margin-top: 2px; + } + .payment-block .content { + display: inline-flex; + justify-content: space-evenly; + + width: 100%; + height: 20px; + } + .payment-block .content .img { + float: left; + + width: 20px; + height: 20px; + + position: absolute; + left: 28px; + } + .payment-block .content .amount { + text-align: right; + + color: var(--text); + font-size: 20px; + + padding-top: 0; + margin-top: 0; + + position: absolute; + right: 27px; + } + .payment-block .content .mixin { + text-align: right; + + color: var(--text); + font-size: 20px; + + padding-top: 0; + margin-top: 0; + + position: absolute; + right: 152px; + } + .payment-block .header2-container { + display: inline-flex; + justify-content: space-between; + height: 10px; + padding-top: 2px; + } + .payment-block .header2-container p { + color: var(--secondary); + font-size: 16px; + font-weight: bolder; + + padding: 20px; + padding-top: 1px; + margin-top: 1px; + } + .payment-block .content2 { + display: inline-flex; + justify-content: space-evenly; + + width: 100%; + height: 20px; + } + .payment-block .content2 .hash { + text-align: right; + + color: blue; + font-size: 20px; + + padding-top: 0; + margin-top: 0; + + position: absolute; + left: 7px; + } + .payment-block .content2 .date { + text-align: right; + + color: var(--text); + font-size: 20px; + + padding-top: 0; + margin-top: 0; + + position: absolute; + right: 10px; +} \ No newline at end of file diff --git a/web/payments.js b/web/payments.js index 66aa4a3..66f511e 100644 --- a/web/payments.js +++ b/web/payments.js @@ -5,6 +5,24 @@ import { } from '../shared/js/functions.js'; +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +// clear Payments Container and reset scrollbar position +function reset() { + // Get the current scrollbar position + let oldPos = window.scrollY; + + // Clear the Payments container + $(".paymentscontainer").empty(); + + // Restore the scrollbar position after delay + sleep(100).then(() => { + window.scrollTo(0, oldPos); + }); +} + // get stored values const XMR_address = localStorage.getItem("moneroXMR_address"); // xmr address @@ -45,9 +63,10 @@ function total_paid() { // run functions every 5 sek. and on page load once payments_xmrpool_eu() -payments_nanopool_org() total_paid() setInterval(() => { + // clear payments list for new render + reset() // render payments_xmrpool_eu() total_paid()