A userscript for the classification lists

Een Nederlandstalige versie van dit artikel vind je hier.

Some time ago, I started experimenting with userscripts. A userscript is an external piece of JavaScript code that can be run on a specific web site or web page but that isn’t a part it. A userscript is typically not created by the webmaster of a website but by someone else, a user.

As my first userscript, I wrote some code to enhance the user experience for the classification lists of the yearly Intersteno Internet Keyboarding Competition. The script also works with the classification lists of the national competitions.

I wasn’t very happy with the way those lists looked, so I added my own CSS, adjusted the column widths, fixed some inconsistencies, improved Dutch, French, German and Spanish translations (English and Italian were fine), added a drop-down list that lets you filter the results on country, and added a button that lets you escape the confinements of the iframe on the Intersteno website and view the classification lists in a full browser window.

Pretty neat what you can accomplish with a userscript, huh?

Here is what a classification list on the Intersteno website looks like when the userscript is in effect (click image to enlarge):

As a comparison, this is what the original version of the same page looks like. Can you spot the differences?

If you want to try all this out for yourself and have a look at what I did, you’ll have to do two things. First, you’ll have to install the Tampermonkey browser extension for your browser (if you haven’t already done so). Next, you must install my userscript, which goes by the name Intersteno_Internet_Results.

Tampermonkey is the world’s most popular userscript manager. It’s a browser extension that allows you to run all kinds of userscripts. You can write your own userscript (as I did), but most users will want to download and install userscripts created by other developers.

You can find my userscript (and many others) on a website called OpenUserJS. If you just type Intersteno in that website’s search bar, you will automatically find my userscript, or you can go directly to the web page for my script using this link.

After you’ve installed Tampermonkey, you can install my userscript. Once installed, go to any of the classification lists and watch the difference. You can always turn the script on or off in the Tampermonkey Dashboard, which gives you an overview of all the scripts you’ve installed.

From time to time I might release a new version of my userscript. Don’t worry. If you’ve kept the default Tampermonkey settings, your browser will automatically download the latest updates when available, or you can check for updates manually or re-install at any time to get the latest version.

Please contact me if you have any questions, problems or suggestions. Don’t hesitate to report any bugs, I will try to fix them when I can.

Now I just hope that the webmaster of intersteno.it – that’s the Italian Intersteno website, where the classification lists are hosted – doesn’t make any significant changes to the pages that contain the classification lists. If they do, that might break my script...

Useful links:

www.intersteno.org/intersteno-internet-contests/classification-lists
www.tampermonkey.net
openuserjs.org
Intersteno_Internet_Results

Geen opmerkingen:

Een reactie posten