PageSourceSearch

https://earconnect.hk/js/util/common.js

js earconnect.hk collected 2026-10-07 21:21:56 UTC 923 bytes, 38 lines download raw bytes

1var common = {};
2
3common.params = (function () {
4    var url = window.document.location.href.toString();
5    var u = url.split("?");
6    if (typeof (u[1]) == "string") {
7        u = u[1].split("&");
8        var get = {};
9        for (var i in u) {
10            var j = u[i].split("=");
11            get[j[0]] = decodeURIComponent(j[1]);
12        }
13        return get;
14    } else {
15        return {};
16    }
17})();
18
19var tpl = function (tpl, el, data, append) {
20    var tpl = $("#" + tpl).html(),
21        el = $("#" + el);
22
23    if (!append) {
24        el.html(template(tpl, data));
25    } else {
26        el.append(template(tpl, data));
27    }
28};
29
30var loading = function (status) {
31    if (status) {
32        $("#loader").fadeIn();
33        $("#loader-wrapper").fadeIn("fast");
34    } else {
35        $("#loader").delay(100).fadeOut();
36        $("#loader-wrapper").delay(100).fadeOut("fast");
37    }
38};

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.