EggXpert

The official Newegg tech support community and Newegg tech support forums. Learn about PC building, case mods, computer repairs, and computer troubleshooting. Get help from knowledgable community members about computer hardware and computer software, laptops, notebooks, netbooks, consumer electronics & mp3 players, home networking, lcd TVs, home audio and more.
Welcome to eggXpert.com. Sign in | Join | Help
in Search
Advanced Search

Make Your Own Firefox Extensions

Last post by . replies.
Sort Posts: Previous Next
  •  07-11-2007, 8:25 AM 102993

    Make Your Own Firefox Extensions



    Make Your Own Firefox Extensions

    Customize The Interface
    1 Customize the Interface
    Almost all of Firefox's interface is customizable, but for starters, here's a simple context-menu add-on that looks up selected text on Wikipedia. Edit the XUL file to change the appearance of your extension: Menu text goes in the label attribute; the accesskey is the keyboard shortcut, which will be underlined in the menu; insertafter indicates position in the context menu; the name of your JavaScript function goes in the oncommand attribute; and the filename of your JS file goes in the <script src> tag.

    Add Some Action
    2 Add Some Action
    The JavaScript code you include in your JS file defines the behavior of your extension. Here, the lookuponwikipedia() function (run by the XUL file) glues together the Wikipedia URL with the selected text and then opens the resulting URL in a new window. What will your extension do? See developer.mozilla.org/en/docs/JavaScript if you need some basic programming help.

    Take Stock
    3 Take Stock
    Update the two Contents.rdf files by replacing all the occurrences of wikipedialookup with the name of your extension. Make sure that the Contents.rdf file in the content folder correctly points to the filename of your XUL file. When you're done, rename the ZIP archive (the one containing the skin and content folders) with a .jar extension.

    Update The Install Script
    4 Update the Install Script
    There are six lines to update in the Install.rdf file: the name of your extension, the version number, the creator (you), a brief description, the name of the .jar file, and a unique ID that differentiates your extension from all others. Update the Install.js file in the same way so your extension will also install on SeaMonkey, Mozilla Suite, and Netscape.

    Put It Back Together
    5 Put It Back Together
    With all the files updated, rename the main ZIP file with an .xpi extension again. Make sure that the directory structure exactly matches the example XPI. To install your extension, drag and drop your XPI file onto an open Firefox window, and then restart Firefox.

    Check Your Work

    6 Check Your Work
    Test your extension on a real Web site. If you get an error, or if something doesn't work, retrace your steps and see if you missed anything. If you want to share your extension with others, or to get help or see other examples, visit developer.mozilla.org/en/docs/Extensions

    Save Your Extensions
    Found a Firefox extension you can't live without? Don't risk your favorites not being around the next time you upgrade your PC or reinstall Microsoft Windows. Right-click any Install Now link at addons.mozilla.org, and select Save Link As to store a copy of the XPI installer someplace safe. Or use another extension—FEBE, which backs up your extensions, themes, and more.

    The Web Your Way Don't have the time to package and test a full-blown extension? Greasemonkey, possibly the most powerful of all Firefox extensions, lets you customize your favorite Web sites with bits of JavaScript. Add features, remove unwanted content, or even fix bugs: Write the scripts yourself or download them from userscripts.org.

    From:PC MAGZINE 

  •  07-11-2007, 5:53 PM 103573 in reply to 102993

    Re: Make Your Own Firefox Extensions

    Ive seen custom broser script mods before i just with they could make the favorits like ie explorer lol id like firefox so much more if they did that

     


    dang sig dont fit lol
    http://i114.photobucket.com/albums/n249/papa_celms/Sigs/PapaSIG.jpg[/img]
View as RSS news feed in XML

 Home   Forums   Chat   Blogs   Deals   Newsletter   About 

 FAQ   Terms of Use   Privacy Policy   Contact Us 

©2010 Newegg, Inc. All rights reserved.