Semi-stable version with old variable names
This commit is contained in:
@@ -65,33 +65,3 @@ function deleteCookieBanner() {
|
||||
$div.remove();
|
||||
}, 400);
|
||||
}
|
||||
|
||||
/* function hasSessionCookie(callback) {
|
||||
$.ajax({
|
||||
url: '/myjupa/api/check-php-session.php',
|
||||
method: 'GET',
|
||||
cache: false, // Ensure we don't get a cached result
|
||||
success: function(response) {
|
||||
callback(response.cookieExists);
|
||||
},
|
||||
error: function() {
|
||||
callback(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Usage in your click handler
|
||||
$(document).on('click', 'a[href*="/myjupa/"]', function (el) {
|
||||
el.preventDefault();
|
||||
const target = $(this).attr("href");
|
||||
|
||||
hasSessionCookie(function(exists) {
|
||||
if (exists) {
|
||||
window.location.assign(target);
|
||||
} else {
|
||||
deleteCookieBanner();
|
||||
|
||||
displayCookieBanner(target);
|
||||
}
|
||||
});
|
||||
}); */
|
||||
Reference in New Issue
Block a user