Public Access
confirm
This commit is contained in:
1 parent
29127d4025
commit
ca89d8e7b7
2 files changed
+37
-1
No files matched your search
@@ -96,6 +96,30 @@ var si = 0,
|
||||
}
|
||||
})();
|
||||
|
||||
/* ---- Hero confirmation notice (shown when ?confirm=...) ---- */
|
||||
(function () {
|
||||
var message = new URLSearchParams(window.location.search).get('confirm');
|
||||
if (!message || !message.trim()) return;
|
||||
|
||||
var notice = document.getElementById('heroConfirmNotice');
|
||||
if (!notice) return;
|
||||
|
||||
var text = notice.querySelector('.hero-notice-text');
|
||||
var close = notice.querySelector('.hero-notice-close');
|
||||
var hero = notice.closest('.hero');
|
||||
|
||||
text.textContent = message.trim();
|
||||
notice.hidden = false;
|
||||
if (hero) hero.classList.add('has-hero-notice');
|
||||
|
||||
if (close) {
|
||||
close.addEventListener('click', function () {
|
||||
notice.hidden = true;
|
||||
if (hero) hero.classList.remove('has-hero-notice');
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
if (slides.length > 0 && dots.length > 0) {
|
||||
function show(i, direction) {
|
||||
if (direction === undefined) return;
|
||||
|
||||
Reference in new issue
Block a user