Last active
March 16, 2021 17:09
-
-
Save TAG-Epic/a09c7286a215165e96a7e39b5f835219 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Monero f2pool stats | |
| // @namespace tag-epic | |
| // @version 1.0 | |
| // @description Gets your current monero stats | |
| // @author Epic | |
| // @match https://www.f2pool.com/xmr/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| document.onkeydown = async (e) => { | |
| if (e.which !== 81) return; | |
| let totalRaw = document.querySelector("body > div.page-wrapper.has-tips.lang-en_US > div.page-main > div > div.header.row.justify-content-center.layout-header-in > div > div.mining-user-info-container.row.justify-content-center > div.row.col-12.order-lg-1.row-revenue > div.col-6.col-lg.order-lg-1.item > div > div").innerText; | |
| let todayRaw = document.querySelector("body > div.page-wrapper.has-tips.lang-en_US > div.page-main > div > div.header.row.justify-content-center.layout-header-in > div > div.mining-user-info-container.row.justify-content-center > div.row.col-12.order-lg-1.row-revenue > div.col-6.col-lg.order-lg-5.item > div > div").innerText; | |
| let total = parseFloat(totalRaw); | |
| let today = parseFloat(todayRaw); | |
| // Get current rate | |
| let res = await fetch("https://api.cryptonator.com/api/ticker/xmr-usd"); | |
| let data = await res.json(); | |
| let conversion = parseFloat(data.ticker.price); | |
| let bal = total + today | |
| let afterConversion = bal * conversion | |
| alert(`Balance (USD): ${afterConversion}$\nBalance (XMR): ${bal}`); | |
| } | |
| })(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
Go to your f2pool dashboard
press "Q"