更新时间:2022-11-28 16:14:53
一旦确定了文件名 onDeterminingFilename
事件
被触发,调用回调函数并且需要2
参数
As soon as the filename is determined onDeterminingFilename
event
is triggered upon which a callback function is called and it takes 2
parameters
item
包含下载ID,url,文件名,引用等数据的对象。 (请参阅item
object which contains data such as download id, url, filename, referrer etc. (see
https://developer.chrome.com/extensions/downloads#type-DownloadItem)
__ suggest
for
循环运行规则中的操作
数据
使用特定的文件名调用
suggest函数
和 conflictAction
。__suggest
based on the specific rulefor
loop runs
to iterate across them.action
data in the rule
the
suggest function is called with specific filename
and
conflictAction
.基本上,文件名是使用 item.filename
进行的,并且通过调用 __ suggest
建议新的文件名,其中键的值 filename
包含新文件名。
Basically the filename is aceessed using item.filename
and a new filename is suggested by calling __suggest
where the value for the key filename
contains the new filename.