PageSourceSearch

https://www.animate-onlineshop.jp/user_data/packages/default/jpn/pc/js/suggestdb.js

js animate-onlineshop.jp collected 2026-10-02 02:42:42 UTC 2,769 bytes, 85 lines download raw bytes

1function createXmlHttpRequest() {
2    var xmlhttp = false;
3    if( window.XMLHttpRequest) {
4        xmlhttp = new XMLHttpRequest();
5    } else if(window.ActiveXObject) {
6        try {
7            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
8        } catch(e) {
9            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
10        }
11    }
12    return xmlhttp;
13}
14
15var xmlhttp = 0;
16var sg = null;
17
18function initSuggest(suggest_obj) {
19    sg = suggest_obj;
20    //区切り文字を変更
21    //sg.delim = ',';
22    //sg.delim = '';
23    //検索ロジックを上書きして、何もしないように変更
24    sg._search = function (text) { return 0; };
25    //検索時のフック関数を指定
26    sg.hookBeforeSearch = getList;
27}
28
29//HTTP通信
30function stateChange() {
31    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
32        var rst = xmlhttp.responseText;
33        //受け取ったデータを配列に変換し、格納
34        sg.candidateList = eval(rst);
35        //データ件数取得
36        var list_count = sg.candidateList.length;
37        //候補リストインデックスを一旦削除
38        sg.suggestIndexList = [];
39        //検索結果が取得できている場合
40        if (list_count != 0) {
41            //インデックスを作成する
42            for (i = 0; i < list_count; i++){
43                sg.suggestIndexList.push(i);
44            }
45            //リストの表示
46            sg.createSuggestArea(sg.candidateList);
47        }else{
48            sg.clearSuggestArea()
49        }
50    }
51}
52
53function getList (text) {
54
55    if (sg == null){
56        return [];
57    }
58    sg.candidateList = [];
59    if (! xmlhttp) xmlhttp = createXmlHttpRequest();
60
61    if (! xmlhttp || xmlhttp.readyState == 1 ||
62        xmlhttp.readyState == 2 || xmlhttp.readyState == 3){
63        return [];
64    }
65    var query = encodeURI(text);
66    //webサーバへ問い合わせ
67    // xmlhttp.open("GET", "srv/search.php?" + query, true);
68    if(location.hostname.match(/animate-onlineshop/)){
69        if(location.protocol.match(/https/)){
70            xmlhttp.open("GET", "https://" + location.hostname + "/srv/search.php?" + query, true);
71        }else{
72            xmlhttp.open("GET", "http://" + location.hostname + "/srv/search.php?" + query, true);
73        }
74    }else{
75        var directory = url.split("/");
76        if(location.protocol.match(/https/)){
77            xmlhttp.open("GET", "https://" + location.hostname + "/" + directory[1] + "/" + directory[2] + "/srv/search.php?" + query, true);
78        }else{
79            xmlhttp.open("GET", "http://" + location.hostname + "/" + directory[1] + "/" + directory[2] + "/srv/search.php?" + query, true);
80        }
81    }
82
83    xmlhttp.onreadystatechange = stateChange;
84    xmlhttp.send(null);
85}

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.