PageSourceSearch

https://www.sga23.ru/bitrix/templates/build_template/js/colorbox.js

js sga23.ru collected 2026-10-07 23:25:33 UTC 805 bytes, 35 lines download raw bytes

1/**
2 * @file
3 * Colorbox JS.
4 */
5
6(function ($, Drupal) {
7
8  'use strict';
9
10  Drupal.behaviors.initColorbox = {
11    attach: function (context, settings) {
12      if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
13        return;
14      }
15
16      if (settings.colorbox.mobiledetect && window.matchMedia) {
17        // Disable Colorbox for small screens.
18        var mq = window.matchMedia('(max-device-width: ' + settings.colorbox.mobiledevicewidth + ')');
19        if (mq.matches) {
20          $.colorbox.remove();
21          return;
22        }
23      }
24
25      settings.colorbox.rel = function () {
26        return $(this).data('colorbox-gallery')
27      };
28
29      $('.colorbox', context)
30        .once('init-colorbox')
31        .colorbox(settings.colorbox);
32    }
33  };
34
35})(jQuery, Drupal);

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.