PageSourceSearch

https://www.aomei.jp/resources/js/search.js

js aomei.jp collected 2026-09-30 14:17:46 UTC 1,857 bytes, 53 lines download raw bytes

1$(function () {
2    function getUrlAttribute(parameName) {
3        //location.search是从当前URL的?号开始的字符串,即查询字符串
4        var query =
5            location.search.length > 0 ? location.search.substring(1) : null;
6        if (null != query) {
7            var args = new Object();
8            var pairs = query.split("&");
9            for (var i = 0; i < pairs.length; i++) {
10                var pos = pairs[i].indexOf("=");
11                if (pos == -1) continue;
12                var argname = pairs[i].substring(0, pos);
13                var value = pairs[i].substring(pos + 1);
14                value = decodeURIComponent(value);
15                args[argname] = value;
16            }
17            //根据键名获取值
18            return args[parameName];
19        }
20        return null;
21    }
22    var keyWords = getUrlAttribute("q");
23    $('.s-form').val(keyWords)
24    if (null != keyWords) {
25        $("#gsc-i-id1").val(keyWords.replace(/\+/g, " "));
26        $(".gsc-search-button-v2").trigger("click");
27    }
28
29    function orValue() {
30        if ($(".s-form").val() == "") {
31            $(".s-btn").attr("disabled", "true");
32            $(".s-form").css("border-color", "red");
33            $(".tips").show();
34        } else if ($(".s-form").val() != "") {
35            $(".s-btn").attr("disabled", false);
36            $(".tips").hide();
37        }
38    }
39    $(".s-form").bind("input propertychange", function (event) {
40        orValue();
41    });
42    $(".input-group-btn").click(function () {
43        orValue();
44    });
45    // 如果有参数再隐藏
46    if (keyWords != null && keyWords != "") {
47        $(".gt3-list").hide();
48        $(".f-art").hide();
49    }
50    setTimeout(function () {
51        $(".gsc-adBlock").css("display", "none"); // 隐藏广告
52    }, 1000);
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.