Skip to content

Commit

Permalink
v1.1.1
Browse files Browse the repository at this point in the history
Fixed payments page look
  • Loading branch information
cookie0o authored Apr 21, 2024
1 parent 9ea989a commit 8f862aa
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
109 changes: 109 additions & 0 deletions payments.css
Original file line number Diff line number Diff line change
@@ -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;
}
21 changes: 20 additions & 1 deletion web/payments.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 8f862aa

Please sign in to comment.