Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
total bills on online.net https://console.online.net/en/bill/list
// 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
You can’t perform that action at this time.