Last active
December 8, 2022 20:40
-
-
Save ferhatbostanci/0f0955498339b2d864a7599326ae1f0a 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
let currency = ''; | |
let totalBalance = 0; | |
let divCount = document.querySelector("#iframeBody > div.b3id-timeline-view.b3-timeline-view > div > div").children.length; | |
for (let i = 3; i <= divCount; i++){ | |
const element = document.querySelector("#iframeBody > div.b3id-timeline-view.b3-timeline-view > div > div > div:nth-child(" + i + ")").querySelector("div > div.b3id-header-container.b3-header-container > div > div.b3-card-header-collapsed-content > div > div.b3-card-header-subtitle"); | |
const text = element.textContent.split(' ').pop().replace(/\u00a0/g, ' ').split(' '); | |
const balance = Number(text[1]); | |
totalBalance += balance; | |
currency = text[0]; | |
} | |
`${currency} ${totalBalance}`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is amazing bro!!