Giter Club home page Giter Club logo

universal-search-addon's Introduction

universal-search-addon

Universal Search desktop experiments in addon format

Build Status

Developer setup

Basic addon environment

These steps come from the extension dev page on MDN. Look there for lots more detail.

  1. Make some changes to your Firefox profile, or create a separate profile.
  • It's nice to create a separate addon profile, but not necessary.
  • In either case, there are some prefs used for addon development; you can easily add them by installing the devprefs addon.
  1. Create a proxy file to link your local addon code to your addon profile.
  • The proxy file is just a file inside your addon profile's extensions directory, where the file name matches the addon's name (in our case, [email protected]), and the file contains the absolute path to the code, with a trailing slash.
  • Example:
    • proxy file: /path/to/ff/Profiles/6h6ygzlo.addon-dev/extensions/[email protected]
    • proxy file contents: /Users/jhirsch/codez/github/mozilla-universal-search-addon/src/
  1. When you want to hack on the addon, start Firefox from the command line:
  • /Applications/Firefox.app/Contents/MacOS/firefox -purgecaches -P "addon-dev"
    • -P "addon-dev" specifies which profile to use
    • -purgecaches stops FF from caching files, so you can instantly (?) see changes

Setup specific to this addon

  1. If you're hacking on the iframe, then configure your profile to use a local copy:
  1. The first time you use a local iframe, you'll probably be serving it from https://localhost:8080/. You will get a security warning, it'll look something like this: To work around this:
  • Surf to the iframe URL (the enter key won't work. You will have to click the Go Button, the little right arrow at the edge of the address bar)
  • Once you load the page, add a security exception for the self-signed cert provided by the local content server.
  1. Restart the browser, and you're in business.

Release process:

  1. Manually bump the version number in src/install.rdf and src/update.rdf.
  2. Bump the version number in package.json using npm version patch. This will generate a git tag, too.
  3. Zip up a new addon: gulp build.
  4. Release the addon to people: scp dist/addon.xpi [email protected]:public_html/universal-search-addon/addon.xpi
  5. Release the src/update.rdf file to people: scp src/update.rdf [email protected]:public_html/universal-search-addon/update.rdf
  6. Probably email the universal-search list?

Useful Snippets

Force the popup to stay open

Note: By design, this only works on one window at a time.

  • Enable & open the Browser Toolkit (see MDN docs, it's easy)
  • At the console, type: window.US.popup.isPinned = true
  • Next time the popup opens, it'll stay open.
  • Set window.US.popup.isPinned to false when you're done - or just close the window.
  • Note: the Browser Toolkit slows performance down a lot. Close it if you don't need to actively debug stuff, and the iframe will be much snappier.

universal-search-addon's People

Contributors

jaredhirsch avatar pdehaan avatar

Watchers

James Cloos 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.