How to Turn Greasemonkey Scripts into Firefox Extensions

By Mark O’Neill

While browsing online the other day, I came across a conversion tool which allows you to take a Greasemonkey script and turn it into a “xpi” Firefox extension.

firefoxextensions.gif

It’s entitled “User Script Compiler” and it is very easy to use. Turning Greasemonkey scripts into proper Firefox extensions is all the rage at the moment. Gina Trapani over at Lifehacker has taken all the best Greasemonkey scripts (with permission of course) for Google products such as Gmail, Google Reader, Google Calendar and YouTube, and merged them all into Firefox extensions. Now you can do the same - even if you don’t have any programming knowledge.

First, you need to get the actual Greasemonkey script. Go to your Firefox profile in your Windows Explorer and find the “gm_scripts” sub-folder. This folder contains all the Greasemonkey scripts that you have installed on your Firefox browser and should all be in javascript file format (.js). Alternatively, you can download some scripts from Userscripts.org. Or check out previously posted ‘20 must-see Greasemonkey Addons

Now right-click on the desired script, choose “rename” and turn the file from javascript to a text file (.txt). Open the text file and you have your code. Then go to the User Script Compiler and enter the required information in the fields provided.

Turn Greasemonkey Scripts into Firefox Extensions

I just copied and pasted the entire contents of the text file into the User Script field. If you want to add the developer’s name and so on, you can normally find it at the beginning of the text file. Then when all fields are filled, press the “compile” button. An XPI file should now be generated for you onto your computer. That’s your new Firefox extension.

To install it onto your Firefox, you have to click on it with your mouse and drag it from your Windows Explorer onto the Firefox browser page. The regular installation box will then open and you should then install it as normal, like any other extension. Close and restart Firefox and your extension should now be there. Try it out to see if it works. I tried it on three different Greasemonkey scripts and they work flawlessly.

Oh and don’t forget to delete the original Greasemonkey script which is now not needed! If you’re feeling nice, why not email the script developer and send them a copy of the new Firefox extension file?

You’re probably asking by now what the advantage is of doing all this. Isn’t a Greasemonkey script and a Firefox extension essentially doing the same thing? Well yes but if you’re say a programmer / developer or just someone who wants to pass on a good script to someone else, converting those Greasemonkey scripts into full Firefox extensions is beneficial if you want to get them out to a wider use base. I mean, everyone “gets” Firefox and extensions but try explaining the finer points of Greasemonkey to someone who can barely grasp the concept of programming. It’s much easier to point them to an extension and say “click on that”. If they have to install the Greasemonkey extension and then the script, they would probably not bother.

Are there any other Firefox compiler tools out there that we should know about?

Filed Under: Browser ¦ Cool Websites ¦ How-To

If you found this article useful then please help us spread the word by Stumbling It.

If you like this article then subscribe to MakeUseOf feed and get latest articles delivered to your Feedreader. If you want to recieve latest articles in your email click here. It's FREE!

Latest from Mark O'Neill:

Blog Posts from Mark O'Neill:
Most Popular:
  • 1 Awesome Gmail tip You Don’t Know about. Seriously.
  • 100 Portable Apps for your USB Stick (both for Mac and Win)
  • 40 Unusual Websites you should Bookmark.
  • The Best, Free Alternatives to Nero CD/DVD Burner
  • 5 Packs to Transform Windows to other OS
  • 13 Bargain Websites That are Cheaper than eBay
  • 7 Excellent destinations to watch TV Shows for FREE
  • 5 Tools to Make Windows XP Look Like Vista
  • 18 Free Ways To Download Any Video off the Internet
  • Watch Popular TV Shows,Cartoons,Movies,Anime for free
  • Collection of Rapidshare Tools and Tricks
  • How To: Move Music from iPod to PC in 5 Easy Steps
  • Gmail Craze: 40 + Tools and Hacks for Gmail
  • Ultimate GMail Collection: over 80 Tools and Tips
  • 5 “DISPOSABLE” Web Accounts to Keep Your Identity Safe
  • Are you a geek? Want to get famous? Write for MakeUseOf.com

    Comments RSS   |  Trackback URI

    8 Comments » Leave One...

    Comment by mark
    2008-02-04 22:36:54

    Nice! I’d rather stick with the gmonkey though.

     
    Comment by Syahid A.
    2008-02-05 03:03:52

    With this script, I don’t have to explain to anyone again what “Greasemonkey” is and what it offers. Essential tool.

     
    2008-02-07 08:28:59

    [...] to Make Use Of for the source. Related [...]

     
     
    2008-03-02 07:20:15

    [...] extensiile scrise de Gina Trapani pe LifeHacker. Un fel de tutorial pe această temă găsiţi aici. Taguri: Firefox, GreaseMonkey, YouTube Număr de afişări: 11 Apreciază articolul: (0 [...]

     
    Comment by Amy
    2008-03-08 14:52:14

    Great post, but is there any similarly simple way to turn extensions into greasemonkey scripts? There are certain extensions I enable and disable a lot — they’d be a lot more useful with greasemonkey’s ability to do so without a restart.

    Thanks.

     
    2008-05-27 21:43:27

    [...] GreaseMonkey, where you can do a lot of damage without restarting. Greasemonkey scripts can then be turned into extensions after you have perfected them. This entry was posted on Wednesday, May 28th, 2008 at 2:43 am and [...]

     
    2008-07-02 07:07:34

    [...] to Make Use Of for the source. Tags: compiler, firefox, firefox-extensions, [...]

     
    Name (required)
    E-mail (required - never shown publicly)
    URI
    Your Comment (smaller size | larger size)
    You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment. All comments are moderated. If your comment does not show up immediately, be patient. It will show up momentarily.


    © 2007-2008 MakeUseOf.com. All rights reserved. Design by Unique Blog Designs.