mirror of
https://github.com/jgthms/bulma.git
synced 2024-10-17 09:04:18 +00:00
Remove book modal
This commit is contained in:
parent
a76c16b387
commit
c63b57b58d
@ -7,23 +7,23 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
|
|
||||||
// Book modal
|
// Book modal
|
||||||
|
|
||||||
const $bookModal = document.getElementById('bookModal');
|
// const $bookModal = document.getElementById('bookModal');
|
||||||
const $bookModalCloseButtons = getAll('.bd-book-modal-close');
|
// const $bookModalCloseButtons = getAll('.bd-book-modal-close');
|
||||||
|
|
||||||
if (!cookieBookModal) {
|
// if (!cookieBookModal) {
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
openModal('bookModal');
|
// openModal('bookModal');
|
||||||
}, 5000);
|
// }, 5000);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if ($bookModalCloseButtons.length > 0) {
|
// if ($bookModalCloseButtons.length > 0) {
|
||||||
$bookModalCloseButtons.forEach($el => {
|
// $bookModalCloseButtons.forEach($el => {
|
||||||
$el.addEventListener('click', event => {
|
// $el.addEventListener('click', event => {
|
||||||
event.stopPropagation();
|
// event.stopPropagation();
|
||||||
Cookies.set(cookieBookModalName, true, { expires: 30 });
|
// Cookies.set(cookieBookModalName, true, { expires: 30 });
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Meta links
|
// Meta links
|
||||||
|
|
||||||
@ -117,6 +117,14 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('keydown', event => {
|
||||||
|
const e = event || window.event;
|
||||||
|
if (e.keyCode === 27) {
|
||||||
|
closeModals();
|
||||||
|
closeDropdowns();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Clipboard
|
// Clipboard
|
||||||
|
|
||||||
const $highlights = getAll('.highlight');
|
const $highlights = getAll('.highlight');
|
||||||
|
@ -9,23 +9,23 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
|
|
||||||
// Book modal
|
// Book modal
|
||||||
|
|
||||||
var $bookModal = document.getElementById('bookModal');
|
// const $bookModal = document.getElementById('bookModal');
|
||||||
var $bookModalCloseButtons = getAll('.bd-book-modal-close');
|
// const $bookModalCloseButtons = getAll('.bd-book-modal-close');
|
||||||
|
|
||||||
if (!cookieBookModal) {
|
// if (!cookieBookModal) {
|
||||||
setTimeout(function () {
|
// setTimeout(() => {
|
||||||
openModal('bookModal');
|
// openModal('bookModal');
|
||||||
}, 5000);
|
// }, 5000);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if ($bookModalCloseButtons.length > 0) {
|
// if ($bookModalCloseButtons.length > 0) {
|
||||||
$bookModalCloseButtons.forEach(function ($el) {
|
// $bookModalCloseButtons.forEach($el => {
|
||||||
$el.addEventListener('click', function (event) {
|
// $el.addEventListener('click', event => {
|
||||||
event.stopPropagation();
|
// event.stopPropagation();
|
||||||
Cookies.set(cookieBookModalName, true, { expires: 30 });
|
// Cookies.set(cookieBookModalName, true, { expires: 30 });
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Meta links
|
// Meta links
|
||||||
|
|
||||||
@ -119,6 +119,14 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('keydown', function (event) {
|
||||||
|
var e = event || window.event;
|
||||||
|
if (e.keyCode === 27) {
|
||||||
|
closeModals();
|
||||||
|
closeDropdowns();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Clipboard
|
// Clipboard
|
||||||
|
|
||||||
var $highlights = getAll('.highlight');
|
var $highlights = getAll('.highlight');
|
||||||
|
Loading…
Reference in New Issue
Block a user