Firefox temporary addon installation - firefox

Is there a way to install firefox temp addon not from about:debugging page? For example, from command-line, profile loading or in another way? Or maybe there's a folder for temp addons, reg value or smth else? Thanks.

Related

Installing WebExtension for Firefox from GPO

I would like to install a WebExtension for Firefox for multiple computers.
I have tried adding in regedit a key named with the uuid of my WebExtension and the path to the xpi "...\Mozilla Firefox\browser\extensions{uuid}.xpi". The key is in HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions\
I have then restarted Firefox but it does not ask to install the WebExtension or installed it.
Am I missing something ?
Thanks.
To install the extension. It should be present on your physical Drive. If you want to a Web-extension for Firefox for multiple computers. You can try and create a batch file that automatically install extension on one click or you can simply use Dropbox across the computers and Sync Your Profile Folder where Firefox files are present with that extension installed.
The extension file (.xpi file) is present. It is located in "C:...\Mozilla Firefox\browser\". I have already created a .msi file to deploy it on multiple computers. The only thing left is that after restarting Firefox, it does not detect that I have set a key in regedit to install a new extension.

Best way to install a firefox extension on the shell

I want to create a new profile with an addon preinstalled.
What works:
run firefox a first time.
add the addon.xpi to profile/extensions/addon.xpi.
edit profile profile/extensions.ini and add Extension0=/full/path/to/extension.xpi.
start firefox again.
What i need:
add the addon to profile/extensions/addon.xpi.
edit extensions.ini or something similiar.
use only relative paths, if possible (seems not to be implemented for extensions.ini)
Finally i want to create a zip file with some firefox preferences/addons, which can be unziped into a profilefolder to create a fresh profile with some preinstalled stuff. For this, it would be important, that everything works with relative paths. If it is definitely not possible, i can add some script to it. But i would prefer some "just unzip" solution.
I think it may be a bit harder, because mozilla wanted to prevent other software from adding toolbars and similiar to firefox by making external addon installation harder. What i already found is the key extensions.autoDisableScopes=0.
What you can do is open firefox with command line options. And pass the file path to your xpi file, so you don't have to mess with all this internals you are over there.
So do this:
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "C:\my.xpi"
and on launch it will open a tab and prompt to install your addon.
In the prefs.js:
pref("extensions.autoDisableScopes", 14); // 0x1 not set
See https://developer.mozilla.org/en-US/Add-ons/Installing_extensions#Disabling_install_locations
Then put the addons into extensions/myaddonid.xpi, making sure the filename is the id given in the install.rdf file inside the addon.xpi (zip-)file as <em:id>addon_id</em:id> tag.
On the next start the addons will be silently installed. Some addons needed one restart to work, at least the toolbar buttons were not added on the first start.
Not sure, if this will still work, when firefox decides to allow only addons signed by addons.mozilla.org. On the other hand, they will allow self-hosting addons, as soon as they are signed by AMO, so preinstalling addons downloaded from there will have a good chance.

Quick and easy question for Firefox add-on devs

I am following the instructions here to make my development environment for firefox:
https://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/
and everything is working great.
On the page as you can see there is one instruction:
Point your Firefox extensions directory to your extension
Instead of constantly preparing and
reinstalling your extension, there’s a
simple way to add a pointer from your
Firefox extensions directory to your
code location. To do this, you must
first find your profile directory: ...
And that too is working great!
My question is:
When I make changes to the JS file in the dev directory, do I have to keep restarting FF for the changes to take effect? Because when I create an extension in Chrome there is a simple link that says "reload" and clicking that reloads the extension without me needing to restart the browser... does any such functionality exist for FF?
Thanks!
R
Extension Developer extension has an option to reload chrome. Doing that should reload your extension without restarting Firefox.
It really depends on the JavaScript files. XPCOM components and JavaScript modules load only once, there you unavoidably need to restart when you change them. JavaScript files loaded via <script> tags are only valid for the window that loaded them - opening a new window will do to load a fresh copy of the script. All that will only work correctly if -purgecaches command line option is specified as other people noted already.

Cant re-install Chrome extension through registry after uninstall in manually

If I install and then uninstall our extension through the registry everything works fine.
But if I install it through the registry and then uninstall it through the browser extensions page the browser remembers it and i can't reinstall it through the registry even if I remove it and then try to reinstall it through the registry.
The only way I can have the extension reinstalled is to add it manually to the extensions page. But, I don't want my users to have to do it manually. Is there a way to force install it again?
Thanks,
Ben
I found a solution to the problem. But, I decided not to use it because I decided it is a good idea not to force installation after the user removed the extension.
Just thought that you will want to know the solution:
Turn off your Google Chrome browser go to the 'Preferences' file under:
c:\users\\AppData\Local\Google\Chrome\User Data\Default
there find your extension under "{Guid}" then delete everything from "{guid}" (included) to the close '}' and then save and start your browser. this hack will force chrome to check again for extensions and your extension will be on again.
I respect the Chrome policy to make the extension blacklisted in this case until the user manually adds it back through Chrome Extensions page UI. However there is another tweak available:
If you are using windows, open the 'Preferences' file in: "C:\users\AppData\Local\Google\Chrome\User Data\Default".
This is a JSON file. Look for your extension id (Guid) key with object value section. Changing the value of 'state' property from 2 to 1 in your extension Guid values section will force chrome to bring back your extension once you start chrome browser.
Note: The chrome browser must be closed completely before modifying this file.

How to use firefox "hello world" sample extension?

I downloaded this Firefox sample extension from mozilla.org, I modified the file install.rdf and changed maxVersion value to 3.6.10 (also tried 3.6.*, 100 and *) and I added a new string with name "hello world" and the value is the path where the folder of the sample extension is to HKCU (also tried HKLM)/Software/Mozilla/Firefox/Extensions/ into the registry.
I start Firefox, go to Tools > Addons, and it says it needs to restart, I restart and go there again and the plugin appears but says "Not compatible with Firefox 3.6.10", and every button appears disabled. Also removing the registry key and folder doesn't uninstall it.
Is there something else I have to change to use the hello world sample in Firefox 3.6.10?
Update 2018
This sample extension was created in 2000s and Firefox switched to a radically different extension system called "Web Extensions" in 2017. The old extensions will not work in the current versions of Firefox and have to be rewritten completely.
The easiest way to start developing an extension is putting a "pointer" file in the extensions folder in the profile directory. I wouldn't touch the registry method until the deployment moment.
Thanks for reminding me to update the example extension. Updated it now.
Basically, the best way to use an extension is to package the addon in .xpi format. Then you just have to open this addon with Firefox. Note:To make an .xpi , take all the contents of helloworld like content,locale,skin,install.rdf,chrome.manifest etc and try to zip it but change the extension to .xpi instead of .zip. Otherwise u can just rename ur helloworld folder to helloworld#xyz.com and then copy this folder into C:\Users\"OS user name"\AppData\Roaming\Mozilla\Firefox\Profiles\h31hcfq9.default\extensions and then restart ur browser. Also, it would be best to learn about addon development with this Basic tutorial on addon development
The procedure to create sample firefox extension can be found on this link. This tutorial explains how to create a Firefox extension to find all links in the current web page, highlight those which have a target attribute and alert you how many links it found.

Resources