forked from rDrama/rDrama
fix console error
parent
b4f7b59f26
commit
1a170d366d
|
@ -700,8 +700,6 @@ document.addEventListener('hide.bs.modal', () => {
|
||||||
if (typeof close_inline_emoji_modal === "function") {
|
if (typeof close_inline_emoji_modal === "function") {
|
||||||
close_inline_emoji_modal();
|
close_inline_emoji_modal();
|
||||||
}
|
}
|
||||||
document.getElementById('imgnav-next').classList.add('d-none')
|
|
||||||
document.getElementById('imgnav-prev').classList.add('d-none')
|
|
||||||
});
|
});
|
||||||
|
|
||||||
document.querySelectorAll('form').forEach(form => {
|
document.querySelectorAll('form').forEach(form => {
|
||||||
|
|
|
@ -4,6 +4,7 @@ let last_img_index
|
||||||
|
|
||||||
const imgnav_next = document.getElementById('imgnav-next')
|
const imgnav_next = document.getElementById('imgnav-next')
|
||||||
const imgnav_prev = document.getElementById('imgnav-prev')
|
const imgnav_prev = document.getElementById('imgnav-prev')
|
||||||
|
const expandImageModal = document.getElementById('expandImageModal')
|
||||||
|
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
if (['ArrowRight', 'd'].includes(e.key) && imgnav_next && !imgnav_next.classList.contains('d-none')) {
|
if (['ArrowRight', 'd'].includes(e.key) && imgnav_next && !imgnav_next.classList.contains('d-none')) {
|
||||||
|
@ -14,6 +15,11 @@ document.addEventListener('keydown', (e) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
expandImageModal.addEventListener('hide.bs.modal', () => {
|
||||||
|
imgnav_next.classList.add('d-none')
|
||||||
|
imgnav_prev.classList.add('d-none')
|
||||||
|
});
|
||||||
|
|
||||||
function handle_navigation(delta) {
|
function handle_navigation(delta) {
|
||||||
position += delta
|
position += delta
|
||||||
if (position < last_img_index) {
|
if (position < last_img_index) {
|
||||||
|
@ -26,8 +32,6 @@ function handle_navigation(delta) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const expandImageModal = document.getElementById('expandImageModal')
|
|
||||||
|
|
||||||
function expandImage(url) {
|
function expandImage(url) {
|
||||||
document.getElementById('imgnav-next').classList.add('d-none')
|
document.getElementById('imgnav-next').classList.add('d-none')
|
||||||
document.getElementById('imgnav-prev').classList.add('d-none')
|
document.getElementById('imgnav-prev').classList.add('d-none')
|
||||||
|
|
Loading…
Reference in New Issue