Chromium now follows Firefox's policy on the download attribute.

This commit is contained in:
ccd0 2014-06-12 09:58:02 -07:00
parent ce6e6b52f5
commit 45d4d2241b

View File

@ -6,9 +6,7 @@ DownloadLink =
className: 'download-link'
textContent: 'Download file'
<% if (type === 'userscript') { %>
unless chrome?
# Firefox places same-origin restrictions on links with the download attribute.
# Specifying the filename with the download attribute only works for same-origin links.
$.on a, 'click', (e) ->
return true if @protocol is 'blob:'
e.preventDefault()
@ -18,7 +16,6 @@ DownloadLink =
@click()
else
new Notice 'error', "Could not download #{file.URL}", 30
<% } %>
$.event 'AddMenuEntry',
type: 'post'