Tailor websites to your needs with user scripts
Posted on 29 Jan 2013 at 09:16
User scripts can add features to your favourite websites, remove unwanted content and do much more besides. Darien Graham-Smith shows how it’s done
If you’ve ever gnashed your teeth in frustration at a website that’s badly designed, lacking features or just plain ugly, then user scripts could be the answer. User scripts are snippets of JavaScript that are executed automatically by your browser whenever you visit a specified site. This code can dynamically modify HTML, CSS and JavaScript content so as to add missing functionality, tidy up visuals and even draw in external links to add to the usefulness of a page. In short, user scripts can transform your web browsing experience.
Showcase
Click here to see our script showcase demonstrating the capabilities of some popular user scriptsSuch scripts effectively work in the same way as browser extension, but they're simpler and more self-contained. They’re an easier way to create your own web page customisations – and as a result there’s a thriving community of hobbyist scripters out there, producing a big library of scripts you can freely draw on.
Using user scripts
The power of user scripts first came to general attention in 2005, thanks to the release of a scripting add-on for Mozilla Firefox called Greasemonkey. It was an instant hit among techies, who loved being able to “route around broken websites, alter site styles, and roll back ill-conceived site redesigns”. A companion website was created at userscripts.org for script creators to share their creations with the wider community. The idea was such a success that the following year O’Reilly Media published a tutorial book of Greasemonkey Hacks (from which the above quote is taken) featuring 100 example scripts.
Greasemonkey remains terrifically popular today – Mozilla’s statistics indicate it’s been downloaded almost 60 million times over the years – and userscripts.org now hosts more than 80,000 scripts. But you no longer need to be a Firefox user to take advantage of user scripts. Both Google Chrome and Opera support user scripts natively, and many popular scripts are available as extensions for Internet Explorer and Safari.
Not all scripts will work in all browsers. Firefox, Chrome and Opera all parse and render web pages in slightly different ways, and have different security models – so a script that works perfectly in one browser may not have the desired effect on another. Even within one platform you may hit compatibility issues: the official Greasemonkey add-on received a major update last year (hitting version 1.0 after seven years in development), which included significant security enhancements. As a result, you may find some scripts at userscripts.org that won’t work in the current version of any browser.
The fragility of scripts
User scripts are offered as-is, with no promise whatsoever of technical support. They may contain bugs, and even if a script works perfectly a browser update can cause it to abruptly stop working – as can a website update. There’s nothing that can be done about this. Greasemonkey can check automatically for script updates, so if there’s a fix it’ll reach you as soon as it’s available, but there’s no guarantee that one will be made available quickly, or ever.
Tracking down useful scripts in the first place can be frustrating too. The userscripts.org database is quite rudimentary, and hosts a great many outdated scripts. Though you can order your search results by date and number of downloads, finding a high-quality, fully working script tends to involve a certain degree of trial and error.
For more details about purchasing this feature and/or images for editorial usage, please contact Jasmine Samra on pictures@dennis.co.uk
advertisement
- iOS 7: release date, features and more
- Yahoo promises not to "screw up" Tumblr
- Dell profits slide 79% amid buyout talks
- Forget cloud subscriptions: users prefer standard licences
- McAfee: cloud storage could help spread viruses
- Analysts question Windows 8 as UK PC shipments slump
- McAfee: smart homes need security
- Firefox 21 lands with "health report" and Android update
- Windows Blue (8.1): release date, screenshots, features
- McAfee LiveSafe protects PCs, mobiles and the cloud
- Hands on with the new Google Maps
- Nokia Lumia 925 review: first look
- Why I won't subscribe to Creative Cloud
- GoPro camera strapped to a remote-control helicopter: the ultimate boy's toy
- Acer Iconia A1 review: first look
- Acer Aspire P3 review: first look
- Acer Aspire R7 review: first look
- How we produce the PC Pro podcast
- Google Now draining iPhone battery
- The government website that doesn't work with IE, Chrome, Firefox, Safari, Macs or smartphones
- How to boost your mobile reception
- How to fix Facebook: Social Fixer
- Taking the stress out of WordPress updates
- Where to download free web fonts
- Turn your tablet into a Sky+ remote control
- How to measure the success of a new IT system
- Three years on: the state of the tablet market
- Windows 8: what works and what doesn't
- Yes, I write down my passwords
- How to make money from apps
advertisement

