Just wanted to add, if you want to see the alert a bit nicer you can use Sweet Alert.
-
Add this to the app footer code:
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
-
Change line 5. Instead of:
var r = confirm(confirmationText);
Change it to: :
var r = swal(confirmationText, {buttons: ["No way!", "Yes, proceed"],});