mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
b2c60ef898
This marks the launch of the new documentation website.
20 lines
480 B
JavaScript
20 lines
480 B
JavaScript
var announcement = document.getElementById('announcement');
|
|
|
|
if (announcement !== null) {
|
|
|
|
var id = announcement.dataset.id;
|
|
|
|
Object.keys(localStorage).forEach(function(key) {
|
|
if (/^global-alert-/.test(key)) {
|
|
if (key !== id ) {
|
|
localStorage.removeItem(key);
|
|
document.documentElement.removeAttribute('data-global-alert');
|
|
}
|
|
}
|
|
});
|
|
|
|
announcement.addEventListener('closed.bs.alert', () => {
|
|
localStorage.setItem(id, 'closed');
|
|
});
|
|
|
|
} |