mozdev.org

Fork me on GitHub

locallink

resources:
What's New
  • Firefox API does not seem to support this functionality any more
  • [Site layout broken by MozDev, I know]
  • Version 0.5 is compatible with FF up to 6.*
  • Version 0.5 is compatible with FF 4.0.*
  • Version 0.5 includes french localisation
  • Version 0.4 is compatible with FF 3.6
  • Git interface
  • Version 0.4 is compatible with FF 3.0
  • Version 0.4 is compatible with FF 3.0 betas
  • Version 0.3 is compatible with FF 2.0
  • Version 0.3 for FF 1.5 & TB 1.5
  • Version 0.2 for Firefox & Thunderbird
  • Version 0.1 for Firefox
  • mozdev.org
Other Stuff

Have you ever wondered why file://-links work from local files (which have file://-URLs) but not from webpages (which have http://-URLs)? Do you have collections of local links which you want to access through your webpage? The LocalLink extension for Mozilla Firefox and Thunderbird allows you to open any such link from the context menu, no matter where the page containing the link resides: right click on the link, choose "Open", and the link will be opened in the current window, a new tab or a new window (for Firefox) resp. in the message pane or a browser window (for Thunderbird), depending on the submenu item you chose.

Note: You can open any link from the "Open" menu, not just local links. In particular this allows you to view links in the message pane of Thunderbird instead of in an external browser (if protocol and file handlers are set up appropriately).

See Installation for download links and instructions.

Background

Mozilla employs a strict security model which distinguishes between "chrome" (components of your browser, accessible by chrome://-URLs), "local" (files on your machine, i.e. accessible by file://-links) and outside. "chrome" can access everything, "local" can access everything but "chrome", outside content can only access outside content. There are many good reasons for this strict behaviour. Imagine outside JavaScript code being allowed to access your local files, or even your browser! Even with JavaScript turned off, outside webpages could check for the presence of specific local files on your machine if Mozilla followed local IMG-links and such.

The discussion about the consequences of the security model for the user tends to be heated. For more information see, among many others, the following bugs:

How it works

As explained above, "chrome" can do anything. This is why you can enter file:// in the location bar and hit enter. Since extensions are part of "chrome" they are allowed to open windows with local links.

Security info and disclaimer

As far as I can tell, this extension does not add any security holes. "chrome" can do anything even without this extension. This extension allows to overcome the local/outside barrier by following local links on user request (through the context menu). It does not enable any automatic processing of local links, such as IMG, JavaScript etc. Yet, you use this extension at your own risk and responsibility. Make sure you know the source of the webpage containing the local link.

To do

Feel free to tell me your suggestions through the Issue Tracker or Pull Requests. My current plans are:

The locallink project can be contacted through the Issue Tracker or Pull Requests.
MozDev layout: Copyright © 2000-2012 (or later). All rights reserved. Terms of Use & Privacy Policy.