Skip to content

Commit

Permalink
quick-installer: use download attribute in a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
yuk7 committed Dec 12, 2023
1 parent 39dbe13 commit d1e200d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions quick-installer/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exit
# HTML Code for browser
#--><title>dotfiles quick installer</title> <!--
#--><div id="main_contents"> <!--
#--> <a href="../">../</a> | <a href="install.sh">install.sh</a> | <a href="install.bat">install.bat</a> | <a href="https://github.com/yuk7/dotfiles">GitHub</a><br> <!--
#--> <a href="../">../</a> | <a href="install.sh" download>install.sh</a> | <a href="install.bat" download>install.bat</a> | <a href="https://github.com/yuk7/dotfiles">GitHub</a><br> <!--
#--> <p>Welcome to dotfiles quick installer!</p> <!--
#--></div> <!--
#--><style> /*
Expand All @@ -96,11 +96,17 @@ exit
#*/ if (ua.includes("bot")) { /*
#*/ } else if (ua.includes("Windows")) { /*
#*/ document.body.innerHTML+="Downloading install.bat"; /*
#*/ location.href="install.bat"; /*
#*/ const element = document.createElement('a'); /*
#*/ element.href = "install.bat"; /*
#*/ element.download = "install.bat"; /*
#*/ element.click(); /*
#*/ } else if (ua.includes("Android") || ua.includes("iPhone")) { /*
#*/ /* Do nothing */ /*
#*/ } else { /*
#*/ document.body.innerHTML+="Downloading install.sh"; /*
#*/ location.href="install.sh"; /*
#*/ const element = document.createElement('a');/*
#*/ element.href = "install.sh"; /*
#*/ element.download = "install.sh"; /*
#*/ element.click(); /*
#*/ } /*
#*/</script>

0 comments on commit d1e200d

Please sign in to comment.