Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
正如 Jamie Wong 所说,Greasemonkey 脚本(或 JavaScript)都无法告诉客户端文件下载的状态。
但是,如果您的 JavaScript 是从您控制的服务器加载的,您可以设置一个系统来轮询服务器有关下载状态的信息。
但是,是的,您可以编写一个可以查看文件下载状态的 Firefox 扩展。......
至于在GM中使用jQuery,您可以在 这个 stackoverflow 答案。
As Jamie Wong said, neither a Greasemonkey script (nor JavaScript) can tell the status of a file-download, client-side.
However, if your JavaScript is loading from a server you control, you can set up a system to poll the server about download status.
But, yes, you could write a Firefox extension that can see file download status.......
As for using jQuery in GM,you can see a simple Greasemonkey script, that uses jQuery, in this stackoverflow answer.
允许 Javascript 访问浏览器的本机功能(例如下载)将是一个安全漏洞,因此是不可能的。
Allowing Javascript to have access to native functionality of your browser (such as downloading) would be a security hole, and is therefore not possible.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
正如 Jamie Wong 所说,Greasemonkey 脚本(或 JavaScript)都无法告诉客户端文件下载的状态。
但是,如果您的 JavaScript 是从您控制的服务器加载的,您可以设置一个系统来轮询服务器有关下载状态的信息。
但是,是的,您可以编写一个可以查看文件下载状态的 Firefox 扩展。
......
至于在GM中使用jQuery,
您可以在 这个 stackoverflow 答案。
As Jamie Wong said, neither a Greasemonkey script (nor JavaScript) can tell the status of a file-download, client-side.
However, if your JavaScript is loading from a server you control, you can set up a system to poll the server about download status.
But, yes, you could write a Firefox extension that can see file download status.
......
As for using jQuery in GM,
you can see a simple Greasemonkey script, that uses jQuery, in this stackoverflow answer.
允许 Javascript 访问浏览器的本机功能(例如下载)将是一个安全漏洞,因此是不可能的。
Allowing Javascript to have access to native functionality of your browser (such as downloading) would be a security hole, and is therefore not possible.