Last active
April 18, 2022 04:47
-
-
Save fatso83/948216a9c414118b9517ae2cd77123cb to your computer and use it in GitHub Desktop.
Bompengeskript Fremtind
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
/* Used on https://minside.fremtindservice.no/passings */ | |
(function() { | |
const priceCols = document.querySelectorAll('.MuiBox-root div div div:nth-child(3n+1) div:nth-child(1)'); | |
let sum=0; | |
for(let n of priceCols) { | |
if( n?.nextSibling?.textContent === 'NOK') { | |
sum+=parseInt(n.textContent,10) | |
} | |
} | |
console.log("Bompasseringer: ",sum, " kr") | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nå er det en trist og skjør dom-traversering. Kan enkelt gjøres mer solid ved å kalle nettverket direkte:
Eksempeldata: