PageSourceSearch

https://swbno.org/js/header-image-viewer.js?v=IMMM7IG0OpaLUciPnxs7H2CjZjmmyfYhmMIW3dCtsgE

js swbno.org collected 2026-10-02 04:20:19 UTC 1,283 bytes, 32 lines download raw bytes

1/*
2 * Full-screen lightbox for the Post/Event detail header image. Clicking the header image opens
3 * Viewer.js (vendored at /lib/jquery-viewer) as a full-viewport overlay showing the image at full
4 * resolution, with zoom (mouse wheel + toolbar, incl. 1:1) and drag-to-pan. Only the header image
5 * is enhanced — content images and related-post thumbnails are left alone.
6 */
7(function () {
8    'use strict';
9    if (typeof Viewer === 'undefined') { return; }
10
11    var images = document.querySelectorAll('.post-detail-header-image img, .event-hero img');
12    Array.prototype.forEach.call(images, function (img) {
13        img.classList.add('header-image-zoomable');
14        // eslint-disable-next-line no-new
15        new Viewer(img, {
16            navbar: false,
17            title: function (image) { return image.alt || ''; },
18            toolbar: {
19                zoomIn: 1, zoomOut: 1, oneToOne: 1, reset: 1,
20                prev: 0, play: 0, next: 0,
21                rotateLeft: 1, rotateRight: 1, flipHorizontal: 0, flipVertical: 0
22            },
23            movable: true,
24            zoomable: true,
25            zoomOnWheel: true,
26            slideOnTouch: true,
27            keyboard: true,
28            backdrop: true,
29            transition: true
30        });
31    });
32})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.