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

Pesquisar no apoio

Evite burlas no apoio. Nunca iremos solicitar que telefone ou envie uma mensagem de texto para um número de telefone ou que partilhe informações pessoais. Por favor, reporte atividades suspeitas utilizando a opção "Reportar abuso".

Saber mais

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

  • 1 resposta
  • 0 têm este problema
  • 23 visualizações
  • Última resposta por 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?

Todas as respostas (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!

Útil?

Colocar questão

Deve iniciar a sessão com a sua conta para responder às mensagens. Por favor, comece uma nova pergunta, se ainda não tiver uma conta.