PageSourceSearch

https://www.jynarque.com/modules/custom/pharma_isi/js/pharma_isi_drawer.js

js jynarque.com collected 2026-10-08 00:24:59 UTC 2,356 bytes, 82 lines download raw bytes

1/**
2 * @file
3 * Theme javascript.
4 */
5
6(function($) {
7
8    /* global mejs */
9    'use strict';
10    $(document).ready(
11        function() {
12            initTray();
13            initScrollUpdate();
14            initTrayScroll();
15        }
16    );
17
18    // isi tray behaviour.
19    function initTray() {
20        var isiContainer = $('.jsIsiContainer');
21        var isiBtnMinimize = $('.jsIsiMinimize');
22        var isiSwapText = $('.jsSwapText');
23        setInterval(
24            function() {
25                initTrayScroll();
26            }, 250
27        );
28        isiBtnMinimize.on(
29            'click',
30            function() {
31                isiContainer.toggleClass('opened isi-drawer-expanded isi-drawer-collapsed');
32                isiSwapText.toggleClass('hide');
33
34                /*
35                        if (isiContainer.hasClass('opened isi-drawer-expanded')) {
36                            isiSwapText.text(isiSwapTextCollapse);
37                        } else {
38                            isiSwapText.text(isiSwapTextExpand);
39                        }
40                */
41            }
42        );
43
44    }
45
46    function initScrollUpdate() {
47        var $window = $(window);
48        var isiSection;
49        if (window.location.href.indexOf('importantsafetyinformation') > 0) {
50            isiSection = $('.info-with-summary-section');
51        } else {
52            isiSection = $('.isi-section');
53        }
54        var isiTray = $('.isi-tray');
55        var windowOffset = $window.scrollTop();
56        var docViewBottom = windowOffset + $window.height() - isiTray.height();
57        var vertTopMargin = 80; // conceal tray when 80 px above isiTop anchor
58        if (isiSection.length && isiTray.length) {
59            var elemTop = isiSection.offset().top - vertTopMargin;
60            if (elemTop <= docViewBottom) {
61                $(isiTray).addClass('hide-tray');
62            } else {
63                $(isiTray).removeClass('hide-tray');
64            }
65        }
66    }
67    // Minimize tray on scroll event
68    $(window).on(
69        'scroll resize',
70        function() {
71            initScrollUpdate();
72        }
73    );
74
75    function initTrayScroll() {
76        $('.jcf-scrollable').mCustomScrollbar({
77            autoDraggerLength: false,
78            mouseWheel: { preventDefault: true },
79            documentTouchScroll: false
80        });
81    }
82})(jQuery);

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.