PageSourceSearch

https://nauss.edu.sa/Style%20Library/ar-sa/Styles/js/naussbreadcrump.js

js nauss.edu.sa collected 2026-10-02 04:23:21 UTC 2,094 bytes, 53 lines download raw bytes

1var sortBy = function(arr, ...sortByArgs){
2    arr.sort(function(a,b){
3      var sortResult = 0;
4      sortByArgs.forEach(function(arg){
5        if (sortResult != 0) return;
6         if(Object.values(arg)[0] == 'desc'){
7           var propName = Object.keys(arg)[0];
8          if (a[propName] > b[propName]){ 
9          sortResult = -1;
10          return;
11          }
12         if (a[propName] < b[propName]) {
13          sortResult = 1;
14           return;
15          }
16         }
17         else {
18        if (a[arg] < b[arg]){ 
19          sortResult = -1;
20          return;
21          }
22         if (a[arg] > b[arg]) {
23          sortResult = 1;
24           return;
25          }
26          }
27       });
28       
29       return sortResult;
30     });
31    }
32       $.ajax( {
33                             type: "GET"
34                             , url: _spPageContextInfo.webServerRelativeUrl.toLowerCase() + "/_api/web/lists/getByTitle('BreadCrump')/items?$select=Title,Link,order0"
35                             , dataType: "json"
36                             , success: function (result) {
37                               sortBy(result.value,"order0")
38   
39                                 for(var i=0;i<result.value.length;i++)
40                                 {
41   
42                                     var li = window.location.href.toLowerCase().indexOf( result.value[i].Link.toLowerCase()) > -1 ? $('<li><a class="active" href="'+result.value[i].Link+'#dvNav"><span>'+result.value[i].Title+'</span></a></li>') : $('<li><a href="'+result.value[i].Link+'#dvNav"><span>'+result.value[i].Title+'</span></a></li>');
43                                     $("#leftNavDiv").append(li);
44                                 }
45                                 if($("#leftNavDiv").find('a.active').length == 0)
46                                 $("#leftNavDiv").remove()
47                             }, error: function (err) {
48                                  $("#dvNav").remove()
49   
50                             }
51                         });
52                       
53  

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.