Last active
          October 24, 2025 06:59 
        
      - 
      
 - 
        
Save Glidias/5f23b7ba8e41193b44595f01e9a51dfd to your computer and use it in GitHub Desktop.  
    Track Credit card spent in OCBC Personal Banking website
  
        
  
    
      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
    
  
  
    
  | Array.from(document.querySelector(".MuiTable-root").querySelectorAll(".TableBody tr")).reduce((accum, r) => {let c = parseFloat(r.querySelector("td:nth-child(3)").textContent.trim()); accum += !isNaN(c) ? c : 0; return accum}, 0) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Right click, inspect element of any area containing the display table within OCBC personal banking website containing listed transactions for the entire month under a credit card statement account (to focus in the correct frame), and copy and paste this code to the Developer console tab and hit ENTER into the console commandline, to get your total credit card spent!
This 1-liner is basically a Array.reduce function to get the sum of all displayed numerically-parsable values shown in the 3rd
<td>column per row in the table.