Created
June 17, 2017 16:49
-
-
Save yuanoook/39a3629e8cadd35419444bc2cf72f635 to your computer and use it in GitHub Desktop.
inbrowser.download.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function download(url) { | |
var a = document.createElement('a'); | |
a.setAttribute('href', url); | |
a.setAttribute('download', ''); | |
a.click(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment