修改firefox的文件上传对话框

发布于 2024-12-18 22:27:25 字数 148 浏览 2 评论 0原文

有没有办法用扩展名(XUL 或 Javascript)修改 Firefox 中的文件上传对话框?

我想让用户可以在将文件上传到任何地方(facebook、gmail、gmx...)之前对其进行加密,我认为最简单的方法是在文件上传对话框中添加一个复选框,然后检查一下。

Is there any way to modify the file upload dialog in firefox with an extension (XUL or Javascript) ?

I'd like to give the user the possibility to encrypt the file(s) before uploading them to whereever (facebook, gmail, gmx, ...) and I thought the easiest way is to add a checkbox to the file upload dialog and check for that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半世蒼涼 2024-12-25 22:27:25

对于类似的东西没有本机支持

因此,您必须找到一种解决方法来提供这种可能性。
最简单的方法很可能是简单地在文件上传按钮附近添加复选框,而不是直接在显示的对话框中添加。很有可能这样会更容易被注意到。

另一种方法是使用其他技术(如 Java 小程序或某些 Flash 内容)创建自己的文件对话框。这种方式的优点很明显,您可以直接在该小程序内处理加密所需的所有操作。然后您的 Firefox 插件只需为每个文件上传对话框触发小程序的加载。

There is no native support for something like that.

So you have to find a workaround to provide this possiblity.
The easiest way would most likely be to simply add the checkbox near the file upload button instead of directly in the dialog that shows up. Most likely it would even be noticed better like this.

An other way would be to create your own file dialog using other technologies like a java applet or some flash content. The advantage of this way is clearly, that you can handle all operation that have to be done for the encryption directly inside that applet. Then your firefox plugin would only have to trigger the loading of your applet for each file upload dialog.

日裸衫吸 2024-12-25 22:27:25

否。内部 nsIFilePicker 接口 用于创建此对话框 -正如您可能看到的那样,没有太多的配置选项。这是因为 Gecko 将使用系统的文件选择对话框(Windows、Mac OS X),并且至少可以说,更改此对话框并非易事。因此,即使您自己创建此对话框 - 您也无法向其中添加复选框。您需要找到其他解决方案。

No. Internally nsIFilePicker interface is used to create this dialog - as you probably see there isn't a whole lot of configuration options. That's because Gecko will use the system's file selection dialog where available (Windows, Mac OS X) and changing this dialog is non-trivial to say the least. So even if you were creating this dialog yourself - you wouldn't be able to add a checkbox to it. You need to find some other solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文