Giter Club home page Giter Club logo

chase-balance-fixer's Introduction

chase-balance-fixer

Run this Chrome extension and never forget how much money you actually have

Setup

For safety reasons I'm not hosting this as a real extension. You never know what those are doing behind the scenes and we're talking banking info here.

So you have to run it yourself. Here's how ๐Ÿ‘‡

  1. Clone repository $ git clone [email protected]:Swizec/chase-balance-fixer.git
  2. Open fix-credit.js and edit CREDIT_ID and CHECKING_ID constants
  3. This is a great chance to look at my code and see it isn't mischievous
  4. Open chase.com and right-click inspect your account list
  5. Find your IDs in a div like this <div class="account-tile" id=<YOUR ID>
  6. Open chrome://extensions turn on Developer mode
  7. Click Load Unpacked
  8. Choose your code

Enjoy โœŒ๏ธ

Here's how it works

My code is purposefully simple. Written in about 10 minutes.

function value(node) {
    return Number(node.textContent.replace("$", "").replace(",", ""));
}

Takes a DOM node and returns its numeric value.

function getNode(account) {
    return document.querySelector(`#${account} .balance`);
}

Takes an account id and uses it to find the balance node. Basic JavaScript DOM stuff so we can avoid dependencies.

setTimeout(() => {
    const credit = getNode(CREDIT_ID),
        checking = getNode(CHECKING_ID);

    if (credit && checking) {
        actualMoneys = value(checking) - value(credit);

        checking.textContent = `$${actualMoneys.toLocaleString("en")}`;
    }
}, 3000);

Chase web client works as an SPA so we have to give it some time to render everything. 3 seconds looked good enough to me.

Code gets your credit card account's node and your checking account node, then updates your checking balance less your credit balance.

That's how you always know how much money you've got.

chase-balance-fixer's People

Contributors

swizec avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.