I am new to Firefox development and am using the Add-on SDK. I would like to know how to get the following user interface in an extension:
Is this interface a panel? If not, what is it and how do I go about getting this interface in a Firefox addon?
No, this isn't a panel. Your screenshot shows a XUL-based dialog window which is why it looks like a native dialog.
The Add-on SDK uses HTML for its needs however, creating a native-looking dialog is hard there. There is a fork of the Add-on SDK with XUL support but it is outdated and very experimental.
The other option would be building a classic extension. It can simply have a XUL file for the dialog (using <dialog> as root tag) and call window.openDialog() at some point to show it.
Related
Can Firefox on MacOS be automated using NSAccessibility APIs or XCUITest framework?
I can access only few buttons of Firefox Window. I want to perform some actions on an alert box, which is from one of the Firefox extension javascript. I have checked using Accessibility inspector as well. However VoiceOver on MacOS can access all the buttons. So I think there is possibly some way to do it.
Any help how to get this working? TIA.Please check Firefox window, which I am trying to automate, here.
I am developing a Firefox addon for making fullpage screenshots of web pages. I know that several good addons that do this are already available, but we have some specific needs so I thought I would try to make my own.
I read that I can do screenshot --fullpage in the Firefox Developer Toolbar. This seems to works well. Can I also call this command from within my addon? If so, how would I go about that?
I've just finished porting a Firefox XUL extension to Firefox SDK, in response to changes coming in a future version of Firefox that would completely break our legacy code. So far, however, I haven't managed to find any guides or documentation for how to migrate users from the older system to the newer one.
Pointing update.rdf to an xpi file generated by the Firefox SDK hasn't produced the desired affect, and simply dragging the xpi into the addon window creates a side-by-side installation.
Any tips on how to gracefully update users to the new architecture?
Looks like this is not only possible, it's very simple: just copy the ID from the install.rdf of the XUL addin and paste it into the ID field of package.json in the SDK addon folder. From reading the docs, I was under the impression the format of the SDK addon ID mattered, looks like I was mistaken.
I am getting started with Firefox addon development and have got myself acquainted with the Add-on Builder. Is this wizard all I need to get deep into Firefox addon development (if so, where would I create the XUL files and how would I create a custom toolbar?). Or is it that one cannot implement all features using this Add-on Builder? Also are there any good tutorials which explain how to get started with Firefox addon development using the Add-on Builder (because it seems so much easier).
Tutorials which I already have referred to:
https://developer.mozilla.org/en/Extensions
http://blog.mozilla.org/addons/2009/
But these are not specific to using the Add-on Builder. I would please like someone to point me to where I can find help to develop using the Add-on Builder.
Also if I am developing the addon locally using the SDK is there any good editor which I can use which will show me the list of commands that I can execute (like Eclipse in Java).
The red line is where i want my icon to appear. Is it possible to do it using the addon builder.
There are currently two kinds of Firefox extensions:
Classic extensions use a XUL-based user interface. They can do almost anything but it might take a bit until you see some results with your extension. For documentation on classic add-ons see How do I write a Firefox Addon?
Extensions based on Add-on SDK use HTML for user interface. The SDK provides a simple but limited API. In particular, it explicitly won't let you create toolbars, only single toolbar icons (which makes sense, extensions shouldn't be wasting so much screen space). It won't let you determine the icon placement either - as of Firefox 4 all extension icons are supposed to appear in the add-on bar (the user can customize the toolbars and change the placement however). You can get low-level platform access with chrome authority however. The official Add-on SDK documentation is pretty much all you've got here I think.Edit: Ok, the information on limitations of the Add-on SDK is somewhat outdated. As of Firefox 30, adding toolbars is possible. Also, as of Firefox 29 the icons are placed in the main toolbar by default - the add-on bar is no more. So the only real limitation remaining is the icon placement.
The Add-on Builder is merely a web interface to the SDK - it allows you to edit the extensions conveniently but otherwise it uses Add-on SDK to generate the extensions.
To put an icon directly in the toolbar currently, your best bet is to use Erik Vold's toolbar module ( available in Builder as a package ). here is an example that does that:
https://builder.addons.mozilla.org/addon/1044724/latest/
I'm looking into chrome frame and I'm wondering how it works.... http://scriptsrc.net shows that it's a javascript that can be embedded on the page....
http://code.google.com/chrome/chromeframe/ shows it as an install file... does the JS prompt for an installation or something?
Google chrome frame is a plugin (think Adobe Flash) for Internet Explorer, that replaces core modules of IE (unlike Flash), like layout/rendering and javascript. But the UI remains. Then there is some javascript that can detect if this is real IE or IE+Chrome, and also offer an install option to the user. Also there is a HTTP-header and a meta-tag that are required to switch IE to chrome mode, when available.
The JavaScript is to detect it and enable it if it's there. (scriptsrc is just giving you the link to the file, which is on the Google CDN.) The end user does have to do a one-time install of it, it's a plug-in (like Flash or Java). Quoting from this page in the Google documentation:
In Internet Explorer, check() determines if Chrome Frame is installed. If not, the user is prompted to install it.