chore: publish from main

This commit is contained in:
github-actions[bot]
2026-07-10 03:24:21 +00:00
parent 9a8e446f02
commit 51b6fa0253
56 changed files with 4496 additions and 992 deletions
@@ -0,0 +1,41 @@
/**
* Extension detail page image gallery.
* Switches the main preview image when a thumbnail is selected.
*/
function initExtensionGallery(): void {
const mainImage = document.getElementById(
"extension-gallery-image"
) as HTMLImageElement | null;
const thumbs = document.querySelectorAll<HTMLButtonElement>(
".extension-gallery-thumb"
);
if (!mainImage || thumbs.length === 0) return;
thumbs.forEach((thumb) => {
thumb.addEventListener("click", () => {
const url = thumb.dataset.galleryUrl;
if (!url) return;
mainImage.src = url;
thumbs.forEach((other) => {
const isActive = other === thumb;
other.classList.toggle("active", isActive);
if (isActive) {
other.setAttribute("aria-current", "true");
} else {
other.removeAttribute("aria-current");
}
});
});
});
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initExtensionGallery, {
once: true,
});
} else {
initExtensionGallery();
}