Skip to content

Commit

Permalink
Merge pull request #138 from AmanS369/master
Browse files Browse the repository at this point in the history
Alert on clicking on download button
  • Loading branch information
SaptarshiSarkar12 authored Oct 22, 2022
2 parents 06b8ad0 + 9fb3e13 commit 9c0b23b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ <h2 class="text-gradient-blue">Be a part of Drifty Family!</h2>
<h4>✨Download Here✨</h4>
</div>
<div id="download_section" class="download_section">
<a href="https://github.com/SaptarshiSarkar12/Drifty/releases/latest/download/Drifty_CLI.exe"
<a onclick="download_alert_window()"
class="btn4">Download Now <i class="fab fa-windows"></i></a>
<a href="https://github.com/SaptarshiSarkar12/Drifty/releases/latest/download/Drifty.jar" class="btn4">Download
<a onclick="download_alert_apple()" class="btn4">Download
Now <i class="fab fa-apple"></i> <i class="fab fa-linux"></i></a>
</div>
<span><b>All releases</b></span>
<div id="releases" class="release_section">
<div id="releases" class="release_section">


</div>
Expand Down
24 changes: 24 additions & 0 deletions Website/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
"use strict";

/* Javascript alert */
function download_alert_window(){
var w = confirm("Do you want to Downlaod");
if(w==true){
alert("Thanks for Downloading");
window.open("https://github.com/SaptarshiSarkar12/Drifty/releases/latest/download/Drifty_CLI.exe");
}
else{
alert("Sorry! You cancelled the Download!");
}
}

function download_alert_apple(){
var a = confirm("Do you want to Downlaod");
if(a==true){
alert("Thanks for Downloading");
window.open("https://github.com/SaptarshiSarkar12/Drifty/releases/latest/download/Drifty.jar");
}
else{
alert("Sorry! You cancelled the Download!");
}
}


const date = new Date();

let darkMode = localStorage.getItem("darkMode");
Expand Down

0 comments on commit 9c0b23b

Please sign in to comment.