Coder Social home page Coder Social logo

simple-sidebar's Introduction

simple-sidebar

A sample bootstrapped extension to add a Web panel sidebar.

What's this?

The window.sidebar.addPanel function has been removed from Firefox 23. That means the ability to add a traditional sidebar panel is no longer available from Web content. Web publishers can still provide a Firefox sidebar either by the new Social API or a standalone Firefox extension.

For the convenience of Web developers, I have made a restartless extension that simply adds a Web panel, like the legacy API. You can utilize this work to create your own sidebar Web panel.

Update: Starting with Firefox 29, the new Sidebar API is available as part of the Firefox Add-on SDK. You may want to try it instead of this custom extension.

Fork, Customize, Pack

This is just a sample extension. First, you have to fork or clone the repository and edit the code under the source directory.

  • bootstrap.js contains the logic as you can see. Change the basename variable to your own. You don't have to touch the other part of the code.
  • install.rdf contains the meta data. Modify the id, name, description, version, creator, homepageURL and localized properties. Remove the existing localized properties if you don't have any localization. See Install Manifests for details.
  • locales.json contains the localized strings as well as the sidebar URL. Add or remove your own locales. The shortcut-key and shortcut-modifiers properties set a keyboard shortcut to open and close the sidebar. In this sample, it will be Ctrl+Alt+P on Windows and Linux, Cmd+Alt+P on Mac. See Keyboard Shortcuts for details.

Once your customization is done, pack it. Archive those three files into a single ZIP file using your favorite archiver. A shell script using the 7-Zip command line program is also available under the bin directory. Note that archiving the containing source directory will not work. Archive the three files, then rename the ZIP file to an arbitrary name ending with a xpi file extension, like the sample simple-sidebar.xpi file under the bundles directory. That's it. Now you can drag and drop the XPI file onto your Firefox browser window to install. Hooray!

Questions?

Drop a line to Kohei.

License

MPL 2.0

Resources

simple-sidebar's People

Contributors

kyoshino avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.