3

我环顾四周,找不到任何可以让我检测到 Chrome 中下载何时完成的东西。

我想这样做的原因是我想在下载后更好地“排序”我的下载,自动根据各种标准。

我尝试使用以下命令设置侦听器:webRequest.onCompleted 虽然这似乎适用于大多数资源(图像、.ico 等),但我无法让它捕获 .ZIP 或 .EXE 文件下载。我不确定为什么它不会,但它可以毫无问题地适用于其他资源。

我没有对其设置过滤器,因此它应该(据我所知)拉入所有资源并检查它们是否有指定的扩展。我知道这可能不是最好的检查方法,但我还没有找到更好的方法。

查看实验性下载 API,这似乎也没有达到我想要的效果,因为它主要只是启动下载,这不是我想要做的。

感谢您的帮助!

4

1 回答 1

0

Haven't seen an extension for this, but when you think about it this kind of makes sense. It almost seems like something that should be native to the browser...I guess it does give you the most recent downloads though and that is relevant to your current task. Anyways, thought I would mention that there is an experimental api that allows interaction with the native download interactions. This may be a reference needed in getting the extension cooking. Good luck

Link to Experimental API:
http://developer.chrome.com/extensions/experimental.downloads.html

于 2012-09-06T08:52:43.510 回答