PageSourceSearch

https://www.3rpsyriacrisis.org/wp-content/themes/pofo/assets/js/hamburger-menu.js?ver=2.9

js 3rpsyriacrisis.org collected 2026-10-02 03:36:54 UTC 2,366 bytes, 77 lines download raw bytes

1"use strict";
2
3function bindEvent(el, eventName, eventHandler) {
4    if (el.addEventListener) {
5        el.addEventListener(eventName, eventHandler, false);
6    } else if (el.attachEvent) {
7        el.attachEvent('on' + eventName, eventHandler);
8    }
9}
10
11/* For remove conflict */
12( function( $ ) {
13
14    var bodyEl = document.body,
15            //content = document.querySelector( '.content-wrap' ),
16            openleftbtn = document.getElementsByClassName('right-menu-button')[0],
17            opensidemenubtn = document.getElementById('mobileToggleSidenav'),
18            openbtn = document.getElementById('open-button'),
19            closebtn = document.getElementById('close-button'),
20            isOpen = false;
21
22    function init() {
23        initEvents();
24    }
25
26    function initEvents() {
27        if (openbtn) {
28            bindEvent(openbtn, 'click', toggleMenu);
29
30        }
31        //openbtn.addEventListener( 'click', toggleMenu );
32        if (closebtn) {
33
34            bindEvent(closebtn, 'click', toggleMenu);
35            //closebtn.addEventListener( 'click', toggleMenu );
36        }
37
38        if( openleftbtn ){
39            bindEvent(openleftbtn, 'click', toggleMenu);
40        }
41
42        if( opensidemenubtn ){
43            bindEvent(opensidemenubtn, 'click', toggleMenu);
44        }
45
46        // close the menu element if the target it´s not the menu element or one of its descendants..
47
48    }
49
50    function toggleMenu() {
51
52        if (isOpen) {
53            classie.remove(bodyEl, 'show-menu');
54            classie.remove(bodyEl, 'left-nav-on');
55            $("#mobileToggleSidenav").closest('nav').removeClass('sidemenu-open');
56            if ( $( ".full-width-pull-menu" ).length ) {
57                classie.remove(bodyEl, 'padding-15px-right');
58                classie.remove(bodyEl, 'overflow-hidden');
59            }
60        }
61        else {
62            classie.add(bodyEl, 'show-menu');
63            classie.add(bodyEl, 'left-nav-on');
64            $("#mobileToggleSidenav").closest('nav').addClass('sidemenu-open');
65            if ( $( ".full-width-pull-menu" ).length ) {
66                classie.add(bodyEl, 'padding-15px-right');
67                setTimeout(function () {
68                    classie.add(bodyEl, 'overflow-hidden');
69                }, 200);
70            }           
71        }
72        isOpen = !isOpen;
73    }
74
75    init();
76
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.