Anchor for Firefox extensions? - firefox-addon

I have a Firefox addon available for my website. I add the download link of the addon to a simple , but when an user click it, it prompts him to download the .XPI file of the addon - Is there any way so I can pop-up the normal EXTENSION INSTALL window for my addon? Is there any special thing to do that or this is available only in addons.mozilla.org?

You can use the InstallTrigger object. Also, you should be using application/x-xpinstall MIME type for your extension file, this will trigger installation even if InstallTrigger isn't used (e.g. JavaScript disabled).

Related

Firefox addon to print / download directly from tab into a specific location

I would like to know if it's possible to develop an addon for Firefox (min version 60) which allows user to download / print direcly in pdf or png an active tab in a specific folder(absolute path outside from the download folder).
The folder could be chosen in the addon's options and the user will only have to click on the addon's icon.
Thanks
There is no need to find an additional Extension API for your functionality. You can use the regular Javascript method window.print() in your content script file to print/download the currently active tab. Tested it on both Chrome and Firefox. Should work fine.

Show system "open with" dialog when clicking file from electron application

In my Electron application I store links to local file paths. Now I would like the user to be able of opening such links using whatever application the operating system is configured for (or the usual "open with" dialog).
Is this possible?
Thanks
Found a list of possible solutions here:
https://stackoverflow.com/a/33425619/2110299
Of these, the most relevant seems to me the shell module plugin:
https://electron.atom.io/docs/api/shell/
Which provides following API:
shell.openItem(fullPath)
Open the given file in the desktop’s default manner.
Returns Boolean - Whether the item was successfully opened.

is there possibility to add extension to firefox in developer mode?

I mean without compressing it to *.xpi. Other browsers like chrome or opera understand when I drag a folder with extension files from system explorer to therirs addon-manager tab, but firefox, when I unpack *.xpi and try to install it as a folder shows : "This addon could not be installed because it appears corrupt" message.
Reason for this that when I try to change the code I must every time to pack my source files to xpi and then refresh the extension. Other way, like in chrome, the browser automatically updates extension when files were changed.
You need to create an extension proxy file. The file is placed in your extensions directory in your profile. It should be named as the id field of your addon. Inside this file you put a single line with the actual path of the source.
Before copying the proxy file you should uninstall the corresponding xpi addon you may have installed.
Check this page for more resources on setting up your dev environment.

Zope external editor with upload-on-save (Notepad++ prefered)

We are doing webdevelopment with Zope.
The web-editor is just horrible. No syntax highlighting, no in-text-tabs, nothing you can work with.
I installed Zope External Editor. It is now possible that I click the "use external editor" button on every element and it creates a temporary file and opens it in Notepad++, awesome.
But one important thing fail: it doesn't save back to Zope when I save the file. I still have to copy the code back to Zope manually.
I also searched for syntax highlighting extension for chrome/firefox at least to highlight the code (but I prefer Notepad++ with upload-on-save).
Can someone help me with that?
Did you also download the ExternalEditor Helper application?
Your browser should open the helper application, which will then open the editor (which you can specify in the configuration, see last point below). This is important because the helper application is responsible for sending changes back to Zope, which it does by keeping an open WebDAV session while you are editing.
You should download the latest helper app here: http://plone.org/products/zope-externaleditor-client
From that page:
Under Windows: Install the windows binary executable.
Open your page in your web browser and click on the link 'edit with external application'
Associate the file with Zope External Editor and make it permanent (first time only)
The file is opened in the editor defined in windows registry with certain editors, a message will ask whether the edition is terminated or not;
keep it until you closed you file and say yes.
If you want to change your default editor for certain content types , or if you want to add proxy parameters, open Zope External Edit in your program files menu and change your local user configuration.
The best option is to not develop Zope applications through-the-web anymore.
Use proper python packages, and you'll get to use your favourite tools without difficult integration with the server.

How Can I Automatically Execute A Link In Internet Explorer

I am trying to create an application to print documents over the web. I have created my document, and made a web page with a meta refresh tag, along the lines of this:
<meta http-equiv="refresh" content="3;http://example.com/download.epl2" />
I specify that the document has a content-type of application/x-epl2, and I have associated .epl2 files on my computer with a program that silently sends them to the printer.
I have put the website into my trusted sites zone.
Currently Internet Explorer pops up the "Open, Save, Cancel" dialog box with no option to automatically open the file.
Is there a setting in IE6/7/8 that I can use to have IE just open the file without prompting?
EDIT
The actual content of the file will differ based on the job, but essentially it is text that follows the Eltron Programming Language.
EDIT
I have accomplished this in both Chrome and Firefox by choosing "Automatically Open Files Of This Type From Now On"
EDIT
The machines this program will be used on will effectively be kiosks that are limited to only accessing my website from their web browsers, so I'm not worried about rogue websites sending documents to my printers.
EDIT
I am using PHP to generate the documents and HTML on the server side, though I expect the solution to be language agnostic.
I would expect that not to be possible, because then you could stumble onto a site that automatically loads and prints a 5000 page document or something, which would not be good.
If you always had a secret desire to develop a custom URL protocol (I know I do), this might be a good excuse to do it. ;-)
http://msdn.microsoft.com/en-us/library/aa767914%28VS.85%29.aspx
There are 1-2 prompts when opening such a link for the first time in IE, but you can choose to automatically open them after that.
I would use javascript to make this happen.
Javascript Window Open
EDIT
Since you have control of the windows box you could use an automate script process to interact with the print window.
autoit3: ControlClick
Write a small utility program that does nothing but send the file passed to it on the command-line to the default system printer.
Then, edit the registry under HKEY_CLASSES_ROOT to associate this program with the .epl2 filetype.
I don't have time to investigate it for You, but there were lots of exploits that could be helpful. Using ie6 without certain fixes seems helpful.
Also there should be an option called "Automatic prompting for file downloads". I use Linux nowadays so I can't chceck if it helps. I found it in some docs.
I'm on a Mac at the moment, but if this is possible in IE I would imagine this page holds the answer to it (or at least hints at it) http://support.microsoft.com/kb/883255
I believe what you're looking for is a setting in Windows, not IE:
Microsoft Support: Not Prompted to Specify Download Folder for File
Try using an older version of IE. Security was looser in the older versions and since it's a non-issue, this could be the quickest solution.

Resources