Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Koala3353 authored Feb 2, 2024
1 parent 71d5a5c commit c54292a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions logincheck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
window.addEventListener("DOMContentLoaded", () => {
var buttons = document.getElementsByClassName('restrict-button');

for (var i = 0; i < buttons.length; i++) {
buttons[i].addEventListener("click", function (event) {
console.log('button clicked');
console.log(localStorage);
var reflowAuth = localStorage.getItem('reflowAuth');
console.log(reflowAuth);

if (!reflowAuth) {
event.preventDefault(); // Prevent default navigation
console.log('reflowAuth: Not logged in');

// Get the toast element
var toastEl = document.getElementById('liveToast');

// Create a new toast instance
var toast = new bootstrap.Toast(toastEl);

// Show the toast
toast.show();
}
});
}
});

0 comments on commit c54292a

Please sign in to comment.