Last active
July 30, 2019 16:08
-
-
Save divinity76/27af01e22cb62532236c61a32383693a to your computer and use it in GitHub Desktop.
total bills on online.net https://console.online.net/en/bill/list
This file contains 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
// execute on https://console.online.net/en/bill/list | |
(function(){ | |
const rex=/^\s*(?<amount>\d+(?:\.\d+)?)\s*\€\s*$/; | |
// rex.exec(text).groups.amount | |
let total=0; | |
$("table:last >> tr:not(:first) > td:nth-child(5)").each(function(){ | |
const plus=rex.exec(this.textContent).groups.amount; | |
console.log(plus); | |
total+=Number(plus); | |
}); | |
return total; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment