// Let list = ["HH8001", "HR9001", "HD9001", "HG8001", "HG1002", "HG2003"]; const extId = ""; function start() { //console.log(list.length) for (let i = 0; i < list.length; i++) { setTimeout(()=>{ const url = `chrome-extension://${extId}/help/causes/${list[i]}.html`; / / url to change yourself to download url const save_link = document. The createElementNS (" http://www.w3.org/1999/xhtml ", "a"); save_link.target = "_blank" save_link.href = url; save_link.download = list[i] + '.html'; fake_click(save_link); },1000 * i) } } function fake_click(obj) { var ev = document.createEvent("MouseEvents"); ev.initEvent("alert", false, false); ev.initMouseEvent( "click", true, false, window, 0, 0, 0, 0, 0 , false, false, false, false, 0, null ); obj.dispatchEvent(ev); } start();Copy the code

Automatically download JS scripts, the URL needs to be changed to their own url to download, if no timer, only 10 will be downloaded