This is a demonstration of the power of the Tampermonkey extension to Chrome.
My employer, Codurance, have a page on their website listing the current staff:
Now it would be useful to know how many people we have listed.
If you were to visit that page, select inspect and type the following into the console of the browser:
This will return the count.
This is a start.
The next step is to make this more visible.
Install the Tampermonkey extension into Chrome.
This will add the following icon to your browser:
Now replace // Your code here… with:
$(‘div.u-heading-v2-3–bottom h2’).text( ‘The Team (‘ + $(‘div.g-max-width-800’).length + ‘)’ );
Save this and view the page.
This will when you revisit the page change the label to include a count of how many people we have.
This is a great way to make small changes to a website that you don’t control.
If you want to allow other people to use an updateable script then you can publish the script on a public url and use the settings tab to record where it comes from.
This results in this (numbers will vary):