Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A simple Greasemonkey style user script to replace account numbers with friendly names in the HSBC business banking user interface
// ==UserScript==
// @name HSBC - Friendly account names
// @namespace
// @description Replace account numbers with friendly names to help differentiate accounts in HSBC UK Business banking
// @include*
// ==/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;

This comment has been minimized.

Copy link

@janevahn janevahn commented Sep 16, 2014

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...


This comment has been minimized.

Copy link

@jobwat jobwat commented Nov 15, 2014

Hey Chris,

I also made a userscript to pad the lack of features of HSBC banking site, you could be interested:

Thanks for sharing! :)


This comment has been minimized.

Copy link

@skrobul skrobul commented Jun 2, 2015

@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
You can’t perform that action at this time.