I am using the latest version from Firefox Addon SDK (https://github.com/mozilla/addon-sdk) to build my extension. Additionally I am using Erik Vold's toolbarbutton package (https://github.com/erikvold/toolbarbutton-jplib) to display the extension button in the top toolbar. When running cfx xpi and installing the extension it tells me everything went fine (no restart or whatsoever required) but the toolbar button only shows up when I am actually restarting the browser.
How can I make it really restartless?
Use the moveTo function to force insert the toolbar button on install. I believe it's a bug in the code but I haven't asked Erik about it.
Something like this will work:
var ToolbarButton = require('toolbarbutton').ToolbarButton;
var tbb = ToolbarButton(options);
tbb.moveTo(options);
Related
I'm updating an old extension, passing from the old XUL code to html/css "chrome" code.
I have an issue with the "options_ui" tag in my .json file... if i load the extension using the current firefox version (46.0.1) i can't see the "options" button of the extension (as shown in about:addons).
But if i load it using the current developer version (48.0a2) it shows and works as espected.
Any suggestion of how can i fix this?, there must be a way to show the options button without using XUL code.
This is the section of options_ui in my json file:
"options_ui": {
"page": "html/options.htm" },
I have the same problem, here's what I found https://blog.mozilla.org/addons/2016/04/29/webextensions-in-firefox-48/ .
Seems that Firefox WebExtensions will be fully functional from v.48, that's why the Options button is so far only visible in the developer version of Firefox.
I'm trying to get my extension (using Firefox Addon SDK 1.17) to work on SeaMonkey (2.30). After modifying install.rdf to allow my extension to be installed, I can see SeaMonkey accepted the extension. However -- my extension's button isn't visible anywhere in the UI. I am using sdk/ui/button/toggle. I have also tried require("sdk/ui").ActionButton but that doesn't seem to do anything either.
What do I need to do to make sure my extension can render a button into SeaMonkey's toolbar?
Looks like the answer is that SeaMonkey does not officially support the Addon SDK yet. Support is planned for SeaMonkey 2.33
There are a couple of options:
patch the sdk to allow support on seamonkey.
copy the button code from the sdk into your add-on, mark it as supporting seamonkey, and use that, possibly uploading the code to npm as a third party module.
I recently use the SDK of mozilla to developp an add-on. But when I tested it, I found that the add-on icon is in the add-on bar.
I wanna to move it on the nav-bar at the installation. How can I do that ?
If you use this toolbarbutton module then you can move the button by setting the toolbarID.
I don't think it's possible to move a widget at the moment.
To resolve the problem. I use a part of the code in toolbarbutton.
You just need replace in toolbarbutton.js the line 73
($("navigator-toolbox") || $("mail-toolbox")).palette.appendChild(tbb);
by this code window.document.getElementById('nav-bar').appendChild(tbb).
Now the toolbarbutton is placed on the right of the nav-bar.
Here you can find the code example used.
I'm new to Firefox extension development. I have gone through some basic tutorial. When I do as shown in the tutorial by placing the folder into profile folder/extensions folder, or in profile folder it made no change in the extension installation after restart.
Then, I have gone through this tutorial as well. I tried using the pointer object also. This also not working for me.
Firefox version I'm using is 14.0.1,
And When I try to install ESPN Crickinfo (you could be able find extension on-line) extension, It also not working. I couldn't open the options page of this extension even.
Any suggestions on this problem???
Try using a fresh profile http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles
Do Chrome or Firefox make your extension's source code open to the host machine? And if yes where are the respective folder on Mac?
Yes, assuming some or all of your extension is written in an interpreted and un-obfuscated language. Plain Javascript is common for extensions in both browsers.
For any firefox extension, if you save the .xpi file instead of installing it, it is just a zip file and you can open it with any archive tool (e.g. 7zip or WinZip).
The same goes for the .crx files Chrome. As an test, I just downloaded and opened the .crx for Google Mail Checker Plus using 7zip, and it looks like this is entirely written in javascript and all the source can be read.
In either case, how much usable source code you can get from this depends on the language(s) that are used in the extension.
Google Chrome installs the extension into ~/Library/Application Support/Google/Chrome/Default/Extensions/<EXTENSION_ID>/ and registers it in its Preferences file (according to this).
As heb says, Firefox installs the extension to ~/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/
For Firefox the path is:
/Users/YOUR_LOGIN/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/
view online
View a Chrome/Firefox/Opera extension/addon’s source in browser (without downloading):
https://robwu.nl/crxviewer/
bookmarklets
bookmarklets usage
Click the bookmarklet when on an extension’s page in the Chrome Web Store, Firefox addon gallery or Opera addon gallery.
bookmarklets source code
load in same tab
javascript:location.href='https://robwu.nl/crxviewer/?crx='+location.href;
open in new tab
javascript:window.open('https://robwu.nl/crxviewer/?crx='+location.href,'_blank');
bookmarklets links
view extension source online (Chrome .crx) # https://robwu.nl/crxviewer/?crx= ← You can drag this link to your bookmark bar to create the bookmarklet, but you have to edit its URL afterwards: Delete everything before javascript, including the single slash: http://delete_me/
view extension source online in new tab (Chrome .crx) # https://robwu.nl/crxviewer/?crx=
I know it's an old topic but for future research.. it could be interesting..so following the link :
How to find extension code?
This article explains very well where are located extensions code for Firefox, Chrome (working on Chromium too of course) on Ubuntu and Windows!
Best,