PageSourceSearch

https://www.glendoick.com/website/functions.32.js

js glendoick.com collected 2026-10-02 08:40:13 UTC 4,137 bytes, 116 lines download raw bytes

1$(document).ready( function() {
2    var docScroll = $(document).scrollTop();
3    var smallHeader = false;
4
5    $(document).scroll(function () {
6        docScroll = $(document).scrollTop();
7        if (docScroll > 0) {
8            if (smallHeader === false) {
9                $('.placeholder-content_top').addClass('small-header');
10                smallHeader = true;
11            }
12        } else {
13            if (smallHeader === true) {
14                $('.placeholder-content_top').removeClass('small-header');
15                smallHeader = false;
16            }
17        }
18    });
19
20    if (docScroll > 0) {
21        if (smallHeader === false) {
22            $('.placeholder-content_top').addClass('small-header');
23            smallHeader = true;
24        }
25    }
26
27    $('.sticky-menu-btn a').click(function (e) {
28        e.preventDefault();
29        $('#custom-toolbar, .sticky-menu-main').addClass('openMenu');
30        $('#custom-toolbar, .sticky-menu-main').removeClass('closeMenu');
31        $('html,body,#container').addClass('noScroll');
32    });
33
34    $('.sticky-search-btn a').click(function(e){
35        e.preventDefault();
36        $('.block_type_search_box_2').toggleClass('openSrc');
37    });
38
39    $('footer .layout_block .block-title').on('click', function() {
40        $(this).parent().find('.block-content').toggleClass('show');
41    })
42
43    $('.placeholder-content_top .block_type_navigation > .in > ul > li .submenu').each ( function () {
44        var subChildren = $(this).find('> ul').children().length;
45        if(subChildren > 15) {
46            $(this).addClass('subBig');
47        }
48    });
49
50    $('.tag-filter .tag-filter-checkbox').wrapAll('<div class="tag-filter-wrap"></div>');
51
52});
53
54$(window).on('load', function() {
55    $('#custom-toolbar').click( function() {
56        $('#custom-toolbar').removeClass('openMenu');
57        $('#custom-toolbar').addClass('closeMenu');
58        $('html,body,#container').removeClass('noScroll');
59    });
60
61    $('#custom-toolbar .block_type_navigation').click( function(e) {
62        e.stopPropagation();
63    });
64
65    $('#custom-toolbar .submenu_button').click( function() {
66        if($(this).closest('li').find('> .sub')) {
67            $(this).closest('li').find('> .sub').toggleClass('show')
68        }
69    })
70});
71
72if(document.querySelector('.tag-filter-checkbox')) {
73    var filterLabels = document.querySelectorAll('.tag-filter-checkbox label'),
74        fliterCheckbox = document.querySelectorAll('.tag-filter-checkbox input')
75
76    for(filterlabel = 0; filterlabel < filterLabels.length; filterlabel++) {
77        filterLabels[filterlabel].addEventListener('click', function() {
78            for(filterinput = 0; filterinput < fliterCheckbox.length; filterinput++) {
79                if (fliterCheckbox[filterinput].hasAttribute('checked')) {
80                    fliterCheckbox[filterinput].removeAttribute('checked')
81                }
82            }
83        })
84    }
85}
86
87let getPageBlocks,
88    getPageImageBlock
89
90if(document.querySelector('.page_columns')) {
91    getPageBlocks = document.querySelectorAll('.page_columns .page_block')
92    getPageBlocks.forEach( function(block) {
93        if (block.querySelector('.block-image')) {
94            getPageImageBlock = block.querySelector('.block-image')
95            block.querySelector('.wrap > .in').prepend(getPageImageBlock)
96        }
97    })
98}
99
100let bgBlocks
101
102if(document.querySelector('.column .content-add-bg')) {
103    if(document.querySelector('.column .content-add-bg')) {
104        document.querySelector('.column_wrapper').classList.add('has-backgrounds')
105        bgBlocks = document.querySelectorAll('.content-add-bg')
106        bgBlocks.forEach( function(block) {
107            block.parentElement.parentElement.classList.add('add-background')
108            if(block.getAttribute('class').includes('green')) {
109                block.parentElement.parentElement.classList.add('green')
110            } else {
111                block.parentElement.parentElement.classList.add('gray')
112            }
113            block.remove()
114        })
115    }
116}

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.