PageSourceSearch

https://orthomedia.org.uk/js/site.js?v00134

js orthomedia.org.uk collected 2026-09-28 08:53:42 UTC 1,725 bytes, 57 lines download raw bytes

1// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
2// for details on configuring this project to bundle and minify static web assets.
3
4// Write your JavaScript code.
5
6
7
8
9/*****SITE MODAL OVERLAY CONTROLS****/
10
11function site_CloseSiteModal() {
12    $('.modal.active, .site_messaging_modal.active').removeClass('active');
13    $('.site_overlay.active').removeClass('active');
14    $('html').removeClass('fixed');
15}
16
17function site_OpenSiteOverlay() {
18    $('html').addClass('fixed');
19    $('.site_overlay').addClass('active');
20}
21
22$(document).ready(function () {
23    // Function to close all modals and overlay
24  
25
26    // Click event to close modal if clicked outside
27    $(document).mouseup(function (e) {
28        var container = $('.modal.active, .site_messaging_modal.active');
29        if (!container.is(e.target) && container.has(e.target).length === 0) {
30            site_CloseSiteModal();
31        }
32    });
33
34    // Keydown event to close modal on Escape key press
35    $(document).keydown(function (e) {
36        if (e.key === "Escape") {
37            site_CloseSiteModal();
38        }
39    });
40
41    // Swipe down event to close modal on touch devices
42    if ($(window).width() < 640) {
43        var startY;
44
45        $(document).on('touchstart', '.modal.active', function (e) {
46            startY = e.originalEvent.touches[0].clientY;
47        });
48
49        $(document).on('touchmove', '.modal.active', function (e) {
50            var moveY = e.originalEvent.touches[0].clientY;
51            if (moveY > startY + 50) { // swipe down threshold
52                site_CloseSiteModal();
53            }
54        });
55    }
56});
57

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.