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.