Created
February 7, 2014 13:00
-
-
Save chrisroos/8862244 to your computer and use it in GitHub Desktop.
A simple Greasemonkey style user script to replace account numbers with friendly names in the HSBC business banking user interface
This file contains 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
// ==UserScript== | |
// @name HSBC - Friendly account names | |
// @namespace http://chrisroos.co.uk/ | |
// @description Replace account numbers with friendly names to help differentiate accounts in HSBC UK Business banking | |
// @include https://www.business.hsbc.co.uk/* | |
// ==/UserScript== | |
(function() { | |
var accounts = { | |
'12345678': 'Current account', | |
'87654321': 'Rainy day' | |
}; | |
var anchors = document.getElementsByTagName('a'); | |
for (var i = 0; i < anchors.length; i++) { | |
var anchor = anchors[i]; | |
var anchorTitle = anchor.title; | |
var r = /Account details for|view a list of recent transactions for|view a list of next working day transactions for/; | |
if (r.test(anchorTitle)) { | |
var accountNumber = anchor.innerText; | |
var accountName = accounts[accountNumber]; | |
anchor.innerText = accountName; | |
}; | |
}; | |
})() |
Hey Chris,
I also made a userscript to pad the lack of features of HSBC banking site, you could be interested: https://github.com/jobwat/hsbc-account-history-rerender.user.js
Thanks for sharing! :)
@poisonrange: I know your comment is couple months old, but you may be interested in my version of the script that works for regular accounts.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Chris,
I'm a novice with this stuff - do you have something like this available for regular HSBC banking accounts? The problem isn't just with their business accounts but their regular accounts as well...
Thanks,
jane