1//------------------------------------------------------------------------------ 2// ã¬ã³ã¡ã³ãæ©è½ 3// Copyright (C) 2021 FUTUREINN CO., LTD. All Rights Reserved. 4//------------------------------------------------------------------------------ 5 6(function(){ 7 var $ = FI.jQuery; 8 //--------------------------------------- 9 // â¼ è¨å® 10 //--------------------------------------- 11 // è¡¨ç¤ºä»¶æ° 12 p_count = 3; 13 //--------------------------------------- 14 15 16 17 var api = "https://ichinomiya.ficsc.jp/ichinomiya/api/recommend.htm?id="; 18// var this_page = location.href; 19 var this_page = FI.my_page_url; 20 var api_call = api + encodeURIComponent(this_page); 21 22 fetch(api_call, { 23 method: "GET", 24 }) 25 .then(function(response) { 26 return response.json(); 27 }) 28 .then(function(json) { 29 var html = ""; 30 // if json["error"]ãåå¨ããªãæã¾ãã¯åå¨ãã¦ãç©ºã®æã«ä»¥ä¸ã®å¦çãè¡ãâ 31 if (json["error"] == 'undefined' || !json["error"]){ 32 var contents = json["contents"]; 33 if(contents.length > 0){ 34 var link_cnt = 0; 35 $.each(contents, function(index, content) { 36 // 5ä»¶ã®ã¿è¡¨ç¤ºãã 37 if(link_cnt < 5){ 38 // if content["info"]ãåå¨ããªãæã¾ãã¯åå¨ãã¦ãç©ºã®æã«ãã¼ã¸ã¿ã¤ãã«ãããã¼ã®ãã®ã¨ããâ 39 // ãã¼ã¸åããªãå ´åã¯åºåããªã 40 if(content["info"] != 'No name found.' && content["name"] != "") { 41 html += '<li><a href="' + content["id"] + '">' + content["name"] + '</a></li>'; 42 link_cnt = link_cnt + 1; 43 } 44 } 45 }) 46 // 1ä»¶ã表示ãããªã³ã¯ããªãæã¯åºåãè¡ããªã 47 if(link_cnt > 0){ 48 $("#reccomend ul").html(html); 49 // ã¬ã³ã¡ã³ãããªãã¤ã³ãå ±édivã表示 50 $('#supportbg').show(); 51 $('#reccomend').show(); 52 } 53 }else{ 54 // ã¬ã³ã¡ã³ããã¼ã¸ãªã 55 $('#reccomend').hide(); 56console.log('ã¬ã³ã¡ã³ããã¼ã¸ãªã','error:',json["error"],'contents:',json["contents"]); 57 } 58 }else{ 59 // ã¬ã³ã¡ã³ãæ å ±ãªã 60 $('#reccomend').hide(); 61console.log('ã¬ã³ã¡ã³ãæ å ±ãªã',json["error"]); 62 } 63 // end 64 }).catch(function(error) { 65console.log('æ¥ç¶å¤±æ', error); 66 }); 67})(); 68 69
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.