Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Handle custom protocol

  • Không có trả lời
  • 1 gặp vấn đề này
  • 5 lượt xem
more options

Dear community,

I am desperately looking for a way to handle custom protocols in Firefox on macOS (both up-to-date). I have seen many questions and many answers, most of them are outdated or irrelevant.

On our intranet, some of the pages have links pointing to "ictfast:xxxxxx". The first part (ictfast) is never changing. The second part (xxxxxx) can be anything. I would like to run an external application when people click on such links.

What I have done so far: step #A1: In "about:config", I created and set the key "network.protocol-handler.expose.ictfast" to false. step #A2: I clicked on a link "ictfast:xxxxxx" step #A3: A box appeared letting me choose my external application

After these steps, if I click on a "ictfast" link, the application runs but I can't access the content in "xxxxxx".

To reproduce this, it is very simple: step #B1: open Automator step #B2: create a new Application step #B3: add the "Run Shell Script" actions step #B4: choose "Pass input" to as arguments" step #B5: remove the default content of the shell script step #B6: type in `echo "$@" > /tmp/args.txt` (without the backticks) step #B7: save and choose this app in step #A3

Now if you click on a "ictfast" link, the file in "/tmp/args.txt" is created, but is empty. There is no arguments passed to the applications.

I was naively believing that when clicking on a "ictfast" link, Firefox would internally run the command `/foo/bar/whatever.app "address"`. But it seems to be more complicated and cryptic than that.

Could anyone help me on this? Thanks!

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.