PageSourceSearch

https://hksfc.org.hk/-/media/SFC/js/index_search_custom.js?4

js hksfc.org.hk collected 2026-10-07 14:49:13 UTC 1,546 bytes, 34 lines download raw bytes

1(function () {
2    function getBaseUrl(currentUrl) {
3        var baseUrl = "https://www.sfc.hk";
4        if (currentUrl.indexOf('https://') !== -1) {
5            var start = 'https://'.length;
6            var suffix = '/tunis/';
7            var index = currentUrl.toLocaleLowerCase().indexOf(suffix, start);
8            if (index !== -1) {
9                start = index + suffix.length;
10            }
11            var end = currentUrl.indexOf('/', start);
12            baseUrl = currentUrl.substring(0, end);
13        }
14        return baseUrl;
15    }
16
17    var baseUrl = getBaseUrl(location.href);
18    var vatpPage = '/Welcome-to-the-Fintech-Contact-Point/Virtual-assets/Virtual-asset-trading-platforms-operators/Lists-of-virtual-asset-trading-platforms';
19    var config = {
20        EN: { Label: 'Lists of virtual asset trading platforms', Link: "".concat(baseUrl, "/en").concat(vatpPage) },
21        TC: { Label: '虛擬資產交易平台名單', Link: "".concat(baseUrl, "/TC").concat(vatpPage) },
22        SC: { Label: '虚拟资产交易平台名单', Link: "".concat(baseUrl, "/TC").concat(vatpPage) }
23    };
24
25    var lang = 'EN';
26    if (location.href.toLocaleLowerCase().indexOf('.hk/tunis/') !== -1) {
27        lang = 'SC';
28    } else if (location.href.toLocaleLowerCase().indexOf('.hk/tc/') !== -1) {
29        lang = 'TC';
30    }
31
32    var $a = $("<a/>").addClass('collapsed').attr('href', config[lang].Link).text(config[lang].Label);
33    $('.home-search-nav a[data-target="#searchLicensee"]').after([$a]);
34})();

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.