biesiad/multiDownload — pull request #15 by sapeish (2013-09-03 04:57:07+00:00)
Title: Added support of the HTML5 download attribute

Added support of the HTML5 download attribute. When used on an anchor,
this attribute signifies that the resource it points to should be
downloaded by the browser rather than navigating to it. This eliminates
the problem of using IFRAME for PDF files which are opened by Chrome and
Firefox instead of downloaded.

It is currently supporte only on latest Chrome and Firefox, so in the
implementation when it is detected that the browser does not support
this feature, a fallback to IFRAME is used. (line 57)

For this feature to be used two things must be specified:
1. Option "type" set to "adownload": $("#button").multiDownload('click',
{type: "adownload"});
2. Elements with href must have a data attribrute "data-name" storing
the name of the file to be downloaded:

The need of the "data-name" attribute is because the value of the
"download" attribute sets the name to be used when downloading the file
which is not always possible to infer from the url.

Sample of the a-download in action:
http://html5-demos.appspot.com/static/a.download.html