haikal/static/js/main.js
Marwan Alwali 8b00f9a40f update
2024-12-31 13:56:15 +03:00

25 lines
594 B
JavaScript

function getCookie(name) {
let cookieValue = null;
if (document.cookie && document.cookie !== '') {
const cookies = document.cookie.split(';');
for (let cookie of cookies) {
cookie = cookie.trim();
if (cookie.substring(0, name.length + 1) === (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
function notify(tag,msg){
Toast.fire({
icon: tag,
titleText: msg
});
}