commit 21/01/2026
This commit is contained in:
15
html/assets/js/log.js
Normal file
15
html/assets/js/log.js
Normal file
@@ -0,0 +1,15 @@
|
||||
$(document).ready(function() {
|
||||
// Your code here
|
||||
console.log("log.js is loaded and ready.");
|
||||
$('#logoutbtn').on('click', function() {
|
||||
// Clear session storage on logout
|
||||
fetch('/logout').then(() => {
|
||||
window.location.href = '/login.html';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(window).on('beforeunload', function() {
|
||||
console.log("User is leaving log.html");
|
||||
// Your cleanup code here
|
||||
});
|
||||
Reference in New Issue
Block a user