PageSourceSearch

https://nimbus.ca/wp-content/themes/bookory/assets/js/frontend/main.js?ver=2.2.9

js nimbus.ca collected 2026-10-02 03:10:14 UTC 2,369 bytes, 77 lines download raw bytes

1(function ($) {
2    'use strict';
3
4    function login_dropdown() {
5        $('.site-header-account').mouseenter(function () {
6            $('.account-dropdown', this).append($('.account-wrap'));
7        });
8    }
9
10    function handleWindow() {
11        var body = document.querySelector('body');
12
13        if (window.innerWidth > body.clientWidth + 5) {
14            body.classList.add('has-scrollbar');
15            body.setAttribute('style', '--scroll-bar: ' + (window.innerWidth - body.clientWidth) + 'px');
16        } else {
17            body.classList.remove('has-scrollbar');
18        }
19    }
20
21    function minHeight() {
22        var $body = $('body'),
23            bodyHeight = $(window).outerHeight(),
24            headerHeight = $('header.header-1').outerHeight(),
25            footerHeight = $('footer.site-footer').outerHeight(),
26            $adminBar = $('#wpadminbar');
27
28            if ($adminBar.length > 0) {
29                headerHeight += $adminBar.height();
30            }
31
32            if($body.find('header.header-1').length){
33
34                $('.site-content').css({
35                    'min-height': bodyHeight - headerHeight - footerHeight - 90
36                });
37            }
38    }
39
40    function setPositionLvN($item) {
41        var sub = $item.children('.sub-menu'),
42            offset = $item.offset(),
43            width = $item.outerWidth(),
44            screen_width = $(window).width(),
45            sub_width = sub.outerWidth();
46        var align_delta = offset.left + width + sub_width - screen_width;
47        if (align_delta > 0) {
48            if ($item.parents('.menu-item-has-children').length) {
49                sub.css({ left: 'auto', right: '100%' });
50            }else {
51                sub.css({ left: 'auto', right: '0' });
52            }
53        } else {
54            sub.css({ left: '', right: '' });
55        }
56    }
57
58    function initSubmenuHover() {
59        $('.site-header .primary-navigation .menu-item-has-children').hover(function (event) {
60            var $item = $(event.currentTarget);
61            setPositionLvN($item);
62        });
63    }
64
65    function backtotop() {
66        $('.scrollup').on('click', function () {
67            $("html, body").animate({ scrollTop: 0 }, 600);
68            return false;
69        });
70    }
71
72    initSubmenuHover();
73    minHeight();
74    handleWindow();
75    login_dropdown();
76    backtotop();
77})(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.