first commit
This commit is contained in:
1
modules/multidownload.js
Normal file
1
modules/multidownload.js
Normal file
@@ -0,0 +1 @@
|
||||
define(["exports"],function(_exports){function download(url){var a=document.createElement("a");a.download="",a.href=url,a.dispatchEvent(new MouseEvent("click"))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=function(urls){if(!urls)throw new Error("`urls` required");var delay=0;urls.forEach(function(url){if(!function(url){var a=document.createElement("a");return a.href=url,location.hostname===a.hostname&&location.protocol===a.protocol}(url))return setTimeout(download.bind(null,url),100*++delay);download(url)})}});
|
||||
Reference in New Issue
Block a user