PageSourceSearch

https://mcce.midland.edu/script/menu.js?v=6.1.7-202607211231

js midland.edu collected 2026-09-24 09:32:07 UTC 3,307 bytes, 76 lines download raw bytes

1if (typeof Array.isArray === 'undefined') {
2    Array.isArray = function (obj) {
3        return Object.prototype.toString.call(obj) === '[object Array]';
4    }
5}
6
7jQuery.extend({
8    menu: function (elem, file, blockedMenu, isStudentOnHold, cb) {
9        $.getJSON("/resource/menu/" + file + ".json", function (data) {
10            var mainmenuUl = $('<ul></ul>');
11            mainmenuUl.attr("class", "navbar-nav mr-auto");
12            $.each(data, function (mainmenuindex, mainmenu) {
13                if (mainmenu.hasOwnProperty('active') && !mainmenu.active)
14                    return true;
15
16                var mainmenuLi = $('<li class="nav-item"></li>');
17                mainmenuUl.append(mainmenuLi);
18
19                if (mainmenu.hasOwnProperty('links')) {
20                    mainmenuLi.addClass("dropdown");
21                    var mainmenuA = $('<a></a>');
22                    mainmenuA.attr("class", "nav-link dropdown-toggle");
23                    mainmenuA.attr("href", "#");
24                    mainmenuA.attr("id", 'm' + mainmenuindex);
25                    mainmenuA.attr("role", "button");
26                    mainmenuA.attr("data-toggle", "dropdown");
27                    mainmenuA.attr("aria-expanded", "false");
28                    mainmenuA.html(mainmenu.mainmenu);
29                    mainmenuLi.append(mainmenuA);
30
31                    var mainmenuDiv = $('<div></div>');
32                    mainmenuDiv.attr("class", "dropdown-menu");
33                    mainmenuDiv.attr("aria-labelledby", 'm' + mainmenuindex);
34                    mainmenuLi.append(mainmenuDiv);
35
36                    $.each(mainmenu.links, function (submenuindex, submenu) {
37                        if (submenu.hasOwnProperty('active') && !submenu.active)
38                            return true;
39                        var submenuA = $('<a></a>');
40                        submenuA.attr("id", submenu.id);
41                        submenuA.attr("href", submenu.href);
42                        submenuA.attr("class", "dropdown-item");
43                        submenuA.html(submenu.submenu);
44                        mainmenuDiv.append(submenuA);
45
46                    });
47                } else {
48                    var mainmenuA = $('<a></a>');
49                    mainmenuA.attr("href", mainmenu.href);
50                    mainmenuA.attr("id", mainmenu.id);
51                    mainmenuA.attr("class", mainmenu.class);
52                    mainmenuA.html(mainmenu.mainmenu);
53                    mainmenuLi.append(mainmenuA);
54                }
55            });
56            $(elem).html(mainmenuUl);
57
58            if (isStudentOnHold) {
59                var blockedMenuLength = blockedMenu.length;
60
61                for (var i = 0; i < blockedMenuLength; i++) {
62                    var menu = blockedMenu[i];
63                    $("#" + menu)
64                        .addClass('disable_a_href')
65                        .append("<span class='disabled_menu_tooltip'>Due to restrictions on your account <br> this option is not available at this <br> time.</span>")
66                        .on("click", function () {
67                            return false;
68                        });
69                }
70            }
71            if (cb && typeof cb === "function") {
72                cb();
73            }
74        });
75    }
76});

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.