如何挂钩Firefox扩展中的下载对话框? [英] How to hook the download dialog in a Firefox extension?

查看:131
本文介绍了如何挂钩Firefox扩展中的下载对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个Firefox扩展名,我需要挂起用户尝试下载文件时出现的下载对话框。

I'm writing a Firefox extension and I need to hook the download dialog that comes up when the user tries to download a file.

换句话说,我需要一个脚本定义的函数,以正常方式显示对话框 。

In other words, I need a script-defined function to be notified instead of the dialog appearing as normal.

我从哪里开始?我尝试阅读XPCOM API参考...但是我最接近的事情

Where do I begin? I tried reading through the XPCOM API Reference... but this is the closest thing I could find.

推荐答案

您需要覆盖 nsIDownloadManagerUI (通过实现)。

You need to override nsIDownloadManagerUI (by implementing it).

这篇关于如何挂钩Firefox扩展中的下载对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆