mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-15 06:57:21 -05:00
tweaked
This commit is contained in:
@@ -1674,6 +1674,17 @@ function buildSearch() {
|
||||
var lightboxScale = 1;
|
||||
var activeOriginImg = null;
|
||||
|
||||
function bindLightboxClicks() {
|
||||
document.addEventListener("click", function (e) {
|
||||
if (!(e.target instanceof HTMLImageElement)) return;
|
||||
var img = e.target;
|
||||
if (!img.closest("main.prose")) return;
|
||||
if (img.closest("a")) return;
|
||||
e.preventDefault();
|
||||
openLightbox(img);
|
||||
});
|
||||
}
|
||||
|
||||
function initLightbox() {
|
||||
if (document.getElementById("image-lightbox")) return;
|
||||
var lb = document.createElement("div");
|
||||
@@ -1922,6 +1933,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
buildSettings();
|
||||
initEasterEggs();
|
||||
initContribSheet();
|
||||
bindLightboxClicks();
|
||||
loadPage();
|
||||
|
||||
window.addEventListener("popstate", loadPage);
|
||||
|
||||
Reference in New Issue
Block a user