PageSourceSearch

https://abs.org.sg/Sitefinity/WebsiteTemplates/Layout/App_Themes/Layout/js/CustomScripts/Layout.js

js abs.org.sg collected 2026-09-24 08:47:24 UTC 2,266 bytes, 66 lines download raw bytes

1
2$(function () {
3    var pagepath = window.location.href;
4
5    if (pagepath.toLowerCase().indexOf("home") > 0) {
6        $("li.home").addClass("active");
7    } else if (pagepath.toLowerCase().indexOf("about") > 0) {
8        $("li.about").addClass("active");
9    } else if (pagepath.toLowerCase().indexOf("guidelines") > 0) {
10        $("li.guidelines").addClass("active");
11    } else if (pagepath.toLowerCase().indexOf("consumer") > 0) {
12        $("li.consumer").addClass("active");
13    }
14    else if (pagepath.toLowerCase().indexOf("sme") > 0) {
15        $("li.sme").addClass("active");
16    }
17    else if (pagepath.toLowerCase().indexOf("newsroom") > 0) {
18        $("li.newsroom").addClass("active");
19    }
20    else if (pagepath.toLowerCase().indexOf("news") > 0) {
21        $("li.news").addClass("active");
22    }
23
24    //else {
25    //    $(".home").addClass("active");
26    //}
27
28    var urlsptCnt = pagepath.split('/');
29    var pagenameno = (parseInt(urlsptCnt.length) == 6) ? (parseInt(urlsptCnt.length) - 2) : (parseInt(urlsptCnt.length) - 1);
30    var pagename = urlsptCnt[pagenameno].toLowerCase();
31
32  //  $(".inner-menu ul li a").removeClass("active");
33
34    $(".inner-menu ul li a").each(function () {
35        if ($(this).attr("href").toLowerCase().indexOf(pagename) > 0 && parseInt(urlsptCnt.length) < 6) {
36            if (parseInt(urlsptCnt.length) != 4)
37            $(this).addClass("active");
38        }
39    });
40
41
42    if (parseInt(urlsptCnt.length) == 6) {
43        pagenameno = parseInt(urlsptCnt.length) - 1;
44        var Childpagename = "/" + urlsptCnt[pagenameno].toLowerCase();
45        $(".accordion-inner ul li a").each(function () {
46            if ($(this).attr("href").toLowerCase().indexOf(Childpagename) > 0) {
47                $(this).addClass("active");
48            }
49
50        });
51    } else {
52      //  $(".accordion-inner ul li a").removeClass("active");
53    }
54
55
56    $(document).on("click", ".newsroomPanel", function () {
57        $("#collapseninteen .newsroomPanel").removeClass("active");
58        var panelYear = $(this).attr("id");
59        $(".panel-defaultannounce").hide();
60
61        $(".panel-defaultannounce#" + panelYear).show();
62        $(this).addClass("active");
63
64    });
65
66});

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.