The Complete Beginner’s Guide to User Scripts

Posted in Web Design • Posted on 7 Comments

A user script is code written in a programming language that allows you to control a piece of software. Think for example, macro’s in Microsoft Office that help improve your work flow. Well did you know that you can do the exact same thing with your browsing experience, and the websites you view? Well you can, and it’s amazing. Greasemonkey first came around in 2004/05, and its the tool that really threw user scripts in the browser out there. Greasemonkey is a Firefox extension that allows you to write scripts that alter the web pages that you view. It allows you to make web pages more usable, more viewable, fix bugs for yourself; the possibilities are endless.
Lets look at an example of a fantastic user script that solves some problems for the user. Twitter is a fantastic tool, that many of us web designers, and developers use to collaborate, share knowledge, and make new connections, as well as letting current, and prospective clients keep up with our work. However, if we are all honest, there are things about twitter that annoy, and limit us. Mentioning someone can be a difficult task, especially when you can’t remember their exact twitter name. Working out which people you follow are following you back is a monumental task. Navigating in the dark with URL shorteners can be potentially dangerous (NSFW). The new re-tweet button doesn’t let you add your own thoughts to a tweet without copy pasting. That’s just naming a few, but that can all be fixed, with a user script!

This user script, Making twitter better!, solves all these issues that we have. It auto-completes twitter names as you type for you, it shows an icon next to people who are following you back, it unshortens url’s for you so you can feel safe clicking links, and it add’s a new button; comment. This really shows the power that these user scripts have.

So what are user scripts coded in?

When you install Greasemonkey in Firefox, you’ll notice no difference at all. Greasemonkey itself doesn’t do these incredible things. It’s the user scripts that Greasemonkey runs that do the work. For the user scripts we are working with, these are imply chunks of javascript code, with a bit of additional information for Greasemonkey to work out where and when to run the script. These user scripts have the power to target a specific site, page, or a group of sites, and it has the power to do anything you can do with javascript, and more. That means, with a basic knowledge of javascript, you can get stuck right into making your own scripts!

What is browser support like?

You’ll be happy to know, that since Greasemonkey’s release in 2004/05,  user scripts are no longer just limited to Firefox. You are able to user userscripts in Internet Explorer, Opera, Chrome, Safari, and of course Firefox, with support for other browsers being limited, but sometimes available.  (I cannot vouch for each of the following options as I only use Chrome as my browser)

Internet Explorer

For internet explorer, your main option for similar functionality appears to be IE7Pro. This is an add-on for IE6, 7 and 8 and adds features such as tab enhancement, ad blocker, flash blocker, mouse gestures, inline search, privacy enhancements, online bookmark service, Greasemonkey-like user script support, and plug-in support.

Chrome

Google Chrome, you’ll be interested to hear, comes with built-in support for user scripts as of February 2010, so no add ons are necessary! Basically, Chrome turns user scripts into extensions and runs them as such. However, support for some user script specific functions are lacking, so be prepared to find the odd script that wont work for you.

Safari

Safari, unlike Chrome, doesn’t come with built-in support. For users of Safari 5, there is an extension called NinjaKit which allows you to obviously run user scripts. For users of older versions of Safari, there is an alternative called Greasekit which is a SIMBL plugin.

Firefox

Firefox obviously harness’ the power of user script through the Greasemonkey script. No surprise there since it has done since 2005!

Opera

Opera, like Chrome, is capable of running user scripts itself. Similarly to Chrome, you may run in to trouble with some scripts, but the majority will run fine.

Some user script for your use

Of course, what use would these browser implementations be without some scripts to use? Here are 20 fantastic scripts to get you started!

YouTube Video Download

Scans the YouTube page for all download formats, from iPod compatible MP4s to high-definition 1080p.

Disable Google Fade-in

Disable the animation from Google’s new homepage.

Show Just Image

Removes garbage from some image hosting sites and displays the image only.

Download from YouTube

Adds FLV, MP4, 3GP, and 720p download links to YouTube.

Google Inline MP3 Player

Inserts Google Reader’s MP3 Flash player next to any linked MP3 file you stumble onto while browsing

Chromium RSS-Feed Detection

Detect the RSS-Feed on Pages and show a little “SearchClone”-dialog

Helvetwitter

Twitter is becoming more and more cluttered with useless features and other junk. This strips it back to the basics.

Helvetical

Helvetical turns the mayhem of the Google interface of Google Calendar into something that doesn’t offend.

Helvetireader

Helvetireader aims to make the interface of Google Reader a clean, minimal experience where you’re not assaulted by an array of colours, social features and buttons.

Faviconize Google

Adds favicons to each link offered by Google search results.


LookItUp

Quickly look something up in Wikipedia, a dictionary or whatever you like (its easy to add custom sites!). The result is displayed directly on the page.

Persistent Max Google Calendar

This script will allow you to max out your screen real estate in Google Calendar by allowing a full screen option via pressing F12.

Helvetimail

Give your Gmail the beautiful, minimal experience it deserves with this Helvetica styled script.

SearchJump

Allows you to jump quickly between search results on different engines.

Nested Twitter Replies

Adds nested replies to every Twitter conversation thread.

Google Search Sidebar

Adds a sidebar with search results from Dictionary.com, Wikipedia, Flickr, and YouTube. Please report any bugs.

TinyURL Decoder

Decodes shortened URLs to their original URLs. Supports a lot of url shorteners.

Facebook Purity

Fluff Busting Purity is a script that alters your Facebook homepage to only show the most relevant information to you.

Make Twitter Better

Nested Replies, Custom Search Tabs, Autocomplete, Pagination, RT button, Media Embed, URL Expansion, Hash Tag Search Links, Social Links

FFixer for Greasemonkey

Enhancements for Facebook: bigger profile pictures and photos, easier viewing of albums, links to download videos, showing people’s age and sign, google calendar integration, bookmarks, keyboard shortcuts & more. Fully customizable!

Further Discussion

Well there you have an introduction to user scripts. They’ve been around for a while, but are as powerful as always, and are becoming more popular in modern browsers. If you have more scripts to share, or want to ask any questions, do so in the comments!

20 Written ArticlesWebsite

Matt is an 18 year old web designer from Scotland, UK. He loves creating beautiful websites across different platforms. High on his things to learn fully are Jquery and php. He is extremely excited by css3 and html5 and can't wait to see them rolled out fully. To learn more about Matt, follow him @QwibbleDesigns, or check out his portfolio.

7 Comments Best Comments First
  • Yonghu

    Sunday, February 5th, 2012 01:07

    6

    I came here looking for a simple guide on how to write my own user scripts, and what I found was “Yet Another List of UserScripts” that you should install. You didn’t so much as provide a link to a real guide!

    Epic Fail!

    +9
  • Thomas

    Saturday, February 25th, 2012 03:34

    7

    i was actually looking for a beginner’s guide to writing user scripts… you know, somewhere to start…

    i can just nose dive into shitty coding with undescriptive variables, lack of comments, without being familiar with the syntax and expect to learn anything. this article didn’t provide any tutorials at all…

    +7
  • Fabiana

    Wednesday, August 18th, 2010 16:27

    1

    Hey,

    Great Article! I just have one question about user scripts:
    Is it always safe to install them? I mean, there’s no way people crash my PC that way?

    Sorry if the question may sound silly – and also sorry about my bad English : )
    Thanks a lot!

    0
    • Matthew Corner

      Wednesday, August 18th, 2010 20:08

      3

      I’d imagine not. User scripts can sometimes require access your personal data and so on, so before installing scripts, I’d read user reviews and so on before clicking the install button. You can never be too safe. However, the vast majority are likely to be safe and legit.

      0
  • Brett Widmann

    Monday, September 13th, 2010 23:45

    5

    I enjoyed the post! I couldn’t live without User Scripts. They make the internet go ’round!

    0
  • Hermitbiker

    Wednesday, August 18th, 2010 23:26

    4

    …. fantastic…. it’s back to the basics for me !! :-)

    -1
  • S.M.Karthick

    Wednesday, August 18th, 2010 12:22

    2

    Enjoyed the post.Thanks! Keep up the Work

    -1
  • Thomas

    Saturday, February 25th, 2012 03:34

    7

    i was actually looking for a beginner’s guide to writing user scripts… you know, somewhere to start…

    i can just nose dive into shitty coding with undescriptive variables, lack of comments, without being familiar with the syntax and expect to learn anything. this article didn’t provide any tutorials at all…

    +7
  • Yonghu

    Sunday, February 5th, 2012 01:07

    6

    I came here looking for a simple guide on how to write my own user scripts, and what I found was “Yet Another List of UserScripts” that you should install. You didn’t so much as provide a link to a real guide!

    Epic Fail!

    +9
  • Brett Widmann

    Monday, September 13th, 2010 23:45

    5

    I enjoyed the post! I couldn’t live without User Scripts. They make the internet go ’round!

    0
  • Hermitbiker

    Wednesday, August 18th, 2010 23:26

    4

    …. fantastic…. it’s back to the basics for me !! :-)

    -1
  • S.M.Karthick

    Wednesday, August 18th, 2010 12:22

    2

    Enjoyed the post.Thanks! Keep up the Work

    -1
  • Fabiana

    Wednesday, August 18th, 2010 16:27

    1

    Hey,

    Great Article! I just have one question about user scripts:
    Is it always safe to install them? I mean, there’s no way people crash my PC that way?

    Sorry if the question may sound silly – and also sorry about my bad English : )
    Thanks a lot!

    0
    • Matthew Corner

      Wednesday, August 18th, 2010 20:08

      3

      I’d imagine not. User scripts can sometimes require access your personal data and so on, so before installing scripts, I’d read user reviews and so on before clicking the install button. You can never be too safe. However, the vast majority are likely to be safe and legit.

      0

Comments are closed.

54.227.41.242 - unknown - unknown - US