Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

Can't use my own script as an application for a given media type.

  • 1 odpověď
  • 0 má tento problém
  • 18 zobrazení
  • Poslední odpověď od srn4

more options

I need to call an executable script that I wrote when I click on a link to a file of a certain file type. I used to be able to browse to my script in order to set it as the desired application, but now I can't find any way to persuade Firefox to call my script when, for example, the linked-to file's name ends in '.dng'. Where is the list of such applications, and how do I add my script to it?

I need to call an executable script that I wrote when I click on a link to a file of a certain file type. I used to be able to browse to my script in order to set it as the desired application, but now I can't find any way to persuade Firefox to call my script when, for example, the linked-to file's name ends in '.dng'. Where is the list of such applications, and how do I add my script to it?

Všechny odpovědi (1)

more options

I figured out a way around the lack of a browse button when choosing an application wherewith to open a media file (I'm running Firefox 128.10.0esr (64-bit) in Linux):

(1) Write your script and make it executable. It must receive the path of the file to be opened as its first argument (and there won't be any other arguments when Firefox calls it).

(2) Click on a link that targets a file of the type you want to associate with an app.

(3) You'll be asked what to do with the file. Pick any application in the list of apps that can open files according to your Firefox. (This is where there used to be a Browse button but it's gone now, so you can't pick your own script, alas. But press on.)

(4) In Firefox, Settings -> General -> Applications, you see a table of "content types" and "actions". One such pair is the one you just added. You want to change the "action" to the path of your script. Basically this is a matter of selecting "Other" a few times until a filesystem browser finally appears. Use the browser to select your script.

Comment: If the Browse button was removed for security reasons, then why is the ability to browse still supported in this weird UX-around-the-barn inconsistency? The ability to *conveniently* specify a script is actually an accessibility issue. Bring back the Browse button!

Pomohla vám tato odpověď?

Položit dotaz

Pro přidání odpovědi se musíte přihlásit ke svému účtu. Pokud dosud nemáte účet, položte nový dotaz.