1 2// ==================================================== 3// å¼çæ¯é¨ HEADLINES ä»å ´ã§ã®æ´»èºé¸æ ä»å ´ã§ã®åºå ´é¸æ 4// ==================================================== 5 6var racerActiveBlock = null; 7var racerParticipationBlock = null; 8 9// ãã¡ã¤ã«ãã¼ãæã«é¢æ°ãèªã¿è¾¼ã 10$(document).ready(function () { 11 // ãã¼ãã«ã®å¤ã®å¤æ´ã¯ã¯ãªãã¯æã«è¡ã ãã¡ã¤ã«ãã¼ãæã«å¼ã³åºãã¦ãåä½ããªã 12 // å¼çæ¯é¨HEADLINESã®ã¨ãªã¢ãæ´æ°ãã 13 getXmlRacerActive(); 14 getXmlRacerParticipation(); 15 16 17 // ã¯ãªãã¯ã¤ãã³ãã¯ãã¹ã©ã¤ããå®è£ ããããã§å¿ è¦ã«ãªãå¯è½æ§ãããã®ã§ã³ã¡ã³ãã¢ã¦ãã§æ®ãã¦ãã 18 // $(document).on("click", "#act01-03", function(){ 19 // getXmlRaceTableAll3(); 20 // }); 21 22}); 23 24// ä»å ´ã§ã®æ´»èºé¸æxmlåå¾ 25function getXmlRacerActive() { 26 download('./xml/racer_active.xml', 'xml', function (xml) { 27 racerActiveBlock = xml; 28 setDataRacerActive(); 29 }); 30} 31 32// ä»å ´ã§ã®åºå ´é¸æxmlåå¾ 33function getXmlRacerParticipation() { 34 download('./xml/racer_participation.xml', 'xml', function (xml) { 35 racerParticipationBlock = xml; 36 setDataRacerParticipation(); 37 }); 38} 39 40// ä»å ´ã§ã®æ´»èºé¸æã®ãã¼ã¿ãã»ãã 41// ToDo è¤æ°ã®ãã¼ã¿ããã£ãå ´åãã¹ã©ã¤ãã§è¡¨ç¤ºããããã©ããä¸ã¤ãã©ã³ãã ã§è¡¨ç¤ºãããã¯æªå® 42function setDataRacerActive() { 43 44 let html = "<div id='tajyo1' class='carousel slide tajyo1' data-ride='carousel'>" 45 + "<h4 class='tajyo_h'><span class='tajyo_t yellow'>ä»å ´ã§ã®<br class='sm_hidden'>æ´»èº</span></h4>" 46 + "</div>"; 47 $(html).replaceAll('.tajyo1'); 48 49 $(racerActiveBlock).find("table").find("record").each(function (index) { 50 51 let jouName = 'ãã¼ãã¬ã¼ã¹' + $(this).find("jname").text(); 52 let title = $(this).find("title").text(); 53 let grade = $(this).find("grade").text(); 54 let playerName = $(this).find("name").text(); 55 let result = $(this).find("kbnname").text(); 56 let pictureUrl = 'https://www.boatrace.jp/racerphoto/' + $(this).find("toban").text() + '.jpg'; 57 let gradeNum = $(this).find("gcd").text(); 58 // gradeã«ãã£ã¦cssã§è£ 飾ããiconã®ã¯ã©ã¹ã夿´ G1ãªãicon_G1,ãã以å¤ã¯icon_other 59 var gradeIcon = gradeNum == 1 ? 'icon_G1' : 'icon_other'; 60 switch(gradeNum) { 61 case "0": 62 gradeIcon = 'icon_SG'; 63 grade = 'SG'; 64 break; 65 case "1": 66 case "10": 67 gradeIcon = 'icon_G1'; 68 grade = 'GI'; 69 break; 70 case "2": 71 gradeIcon = 'icon_G2'; 72 grade = 'Gâ ¡'; 73 break; 74 case "3": 75 case "6": 76 case "11": 77 gradeIcon = 'icon_G3'; 78 grade = 'Gâ ¢'; 79 break; 80 case "4": 81 case "7": 82 case "8": 83 case "9": 84 gradeIcon = 'icon_other'; 85 grade = 'ä¸è¬'; 86 break; 87 default: 88 gradeIcon = 'icon_other'; 89 grade = 'ä¸è¬'; 90 break; 91 } 92 93 // HTMLãçæ 94 // ToDo class="tajyo_syu icon_G1"ãªã©ãã¢ãã¯ã«è¨è¿°ããã¦ããã¯ã©ã¹åããã®ã¾ã¾åãè¾¼ãã§ããåæãããã®ã§å¿ è¦ãããã°ä¿®æ£ãã 95 if(index==0) { 96 let html = "<div id='tajyo1' class='carousel slide tajyo1' data-ride='carousel'>" 97 + "<h4 class='tajyo_h'><span class='tajyo_t yellow'>ä»å ´ã§ã®<br class='sm_hidden'>æ´»èº</span></h4>" 98 + "<ol class='carousel-indicators'>" 99 + "<li data-target='#tajyo1' data-slide-to='0' class='active'></li>" 100 + "</ol>" 101 + "<div class='carousel-inner'>" 102 + "<div class='carousel-item active'>" 103 + "<div class='tajyo_wrap'>" 104 + "<div class='tajyo_info'>" 105 + "<p class='tajyo_race'>" 106 + "<span class='tajyo_race_jo b'>" + jouName + "</span>" 107 + "<span class='tajyo_syu " + gradeIcon + "'>" + grade + "</span>" 108 + "<span class='tajyo_race_name'>" + title + "</span>" 109 + "<span class='tajyo_race_player'>" + playerName + "鏿</span>" 110 + "<span class='tajyo_race_seiseki'>" + result + "</span>" 111 + "</p>" 112 + "</div>"
113 + "<div class='tajyo_photo'><img src='" + pictureUrl + "' alt='" + playerName + "'></div>" 114 + "</div>" 115 + "</div>" 116 + "</div>" 117 + "<a class='carousel-control-prev' href='#tajyo1' role='button' data-slide='prev'>" 118 + "<span class='carousel-control-prev-icon' aria-hidden='true'></span>" 119 + "<span class='sr-only'>Previous</span>" 120 + "</a>" 121 + "<a class='carousel-control-next' href='#tajyo1' role='button' data-slide='next'>" 122 + "<span class='carousel-control-next-icon' aria-hidden='true'></span>" 123 + "<span class='sr-only'>Next</span>" 124 + "</a>" 125 + "</div>"; 126 127 $(html).replaceAll('.tajyo1'); 128 } else { 129 $(".tajyo1").find("ol[class='carousel-indicators']").append("<li data-target='#tajyo1' data-slide-to='" + index + "'></li>"); 130 131 $(".tajyo1").find("div[class='carousel-inner']").append("<div class='carousel-item'>" 132 + "<div class='tajyo_wrap'>" 133 + "<div class='tajyo_info'>" 134 + "<p class='tajyo_race'>" 135 + "<span class='tajyo_race_jo b'>" + jouName + "</span>" 136 + "<span class='tajyo_syu " + gradeIcon + "'>" + grade + "</span>" 137 + "<span class='tajyo_race_name'>" + title + "</span>" 138 + "<span class='tajyo_race_player'>" + playerName + "鏿</span>" 139 + "<span class='tajyo_race_seiseki'>" + result + "</span>" 140 + "</p>" 141 + "</div>" 142 + "<div class='tajyo_photo'><img src='" + pictureUrl + "' alt='" + playerName + "'></div>" 143 + "</div>" 144 + "</div>"); 145 } 146 147 }); 148} 149 150// ä»å ´ã§ã®åºå ´é¸æã®ãã¼ã¿ãã»ãã 151// ToDo è¤æ°ã®ãã¼ã¿ããã£ãå ´åãã¹ã©ã¤ãã§è¡¨ç¤ºããããã©ããä¸ã¤ãã©ã³ãã ã§è¡¨ç¤ºãããã¯æªå® 152function setDataRacerParticipation() { 153 154 let html = "<div id='tajyo2' class='carousel slide tajyo2' data-ride='carousel'>" 155 + "<h4 class='tajyo_h'><span class='tajyo_t'>ä»å ´<br class='sm_hidden'>" 156 + "ãã£ãã</span></h4>" 157 + "</div>"; 158 $(html).replaceAll('.tajyo2'); 159 160 $(racerParticipationBlock).find("table").find("record").each(function (index) { 161 162 let jouName = 'ãã¼ãã¬ã¼ã¹' + $(this).find("jname").text(); 163 let title = $(this).find("title").text(); 164 let grade = $(this).find("grade").text(); 165 let playerName = $(this).find("name").text(); 166 let pictureUrl = 'https://www.boatrace.jp/racerphoto/' + $(this).find("toban").text() + '.jpg'; 167 let gradeNum = $(this).find("gcd").text(); 168 // gradeã«ãã£ã¦cssã§è£ 飾ããiconã®ã¯ã©ã¹ã夿´ G1ãªãicon_G1,ãã以å¤ã¯icon_other 169 var gradeIcon = gradeNum == 1 ? 'icon_G1' : 'icon_other'; 170 switch(gradeNum) { 171 case "0": 172 gradeIcon = 'icon_SG'; 173 grade = 'SG'; 174 break; 175 case "1": 176 case "10": 177 gradeIcon = 'icon_G1'; 178 grade = 'GI'; 179 break; 180 case "2": 181 gradeIcon = 'icon_G2'; 182 grade = 'Gâ ¡'; 183 break; 184 case "3": 185 case "6": 186 case "11": 187 gradeIcon = 'icon_G3'; 188 grade = 'Gâ ¢'; 189 break; 190 case "4": 191 case "7": 192 case "8": 193 case "9": 194 gradeIcon = 'icon_other'; 195 grade = 'ä¸è¬'; 196 break; 197 default: 198 gradeIcon = 'icon_other'; 199 grade = 'ä¸è¬'; 200 break; 201 } 202 203 if(index==0) { 204 // HTMLãçæ 205 // ToDo class="tajyo_syu icon_other"ãªã©ãã¢ãã¯ã«è¨è¿°ããã¦ããã¯ã©ã¹åããã®ã¾ã¾åãè¾¼ãã§ããåæãããã®ã§å¿ è¦ãããã°ä¿®æ£ãã 206 let html = "<div id='tajyo2' class='carousel slide tajyo2' data-ride='carousel'>" 207 + "<h4 class='tajyo_h'><span class='tajyo_t'>ä»å ´<br class='sm_hidden'>" 208 + "ãã£ãã</span></h4>" 209 + "<ol class='carousel-indicators'>"
210 + "<li data-target='#tajyo2' data-slide-to='0' class='active'></li>" 211 + "</ol>" 212 + "<div class='carousel-inner'>" 213 + "<div class='carousel-item active'>" 214 + "<div class='tajyo_wrap'>" 215 + "<div class='tajyo_info'>" 216 + "<p class='tajyo_race'>" 217 + "<span class='tajyo_race_jo b'>" + jouName + "</span>" 218 + "<span class='tajyo_syu " + gradeIcon + "'>" + grade + "</span>" 219 + "<span class='tajyo_race_name'>" + title + "</span>" 220 + "<span class='tajyo_race_player'>" + playerName + "鏿</span>" 221 + "</p>" 222 + "</div>" 223 + "<div class='tajyo_photo'><img src='" + pictureUrl + "' alt='" + playerName + "'></div>" 224 + "</div>" 225 + "</div>" 226 + "</div>" 227 + "<a class='carousel-control-prev' href='#tajyo2' role='button' data-slide='prev'>" 228 + "<span class='carousel-control-prev-icon' aria-hidden='true'></span>" 229 + "<span class='sr-only'>Previous</span>" 230 + "</a>" 231 + "<a class='carousel-control-next' href='#tajyo2' role='button' data-slide='next'>" 232 + "<span class='carousel-control-next-icon' aria-hidden='true'></span>" 233 + "<span class='sr-only'>Next</span>" 234 + "</a>" 235 + "</div>"; 236 237 $(html).replaceAll('.tajyo2'); 238 } else { 239 $(".tajyo2").find("ol[class='carousel-indicators']").append("<li data-target='#tajyo2' data-slide-to='" + index + "'></li>"); 240 241 $(".tajyo2").find("div[class='carousel-inner']").append("<div class='carousel-item'>" 242 + "<div class='tajyo_wrap'>" 243 + "<div class='tajyo_info'>" 244 + "<p class='tajyo_race'>" 245 + "<span class='tajyo_race_jo b'>" + jouName + "</span>" 246 + "<span class='tajyo_syu " + gradeIcon + "'>" + grade + "</span>" 247 + "<span class='tajyo_race_name'>" + title + "</span>" 248 + "<span class='tajyo_race_player'>" + playerName + "鏿</span>" 249 + "</p>" 250 + "</div>" 251 + "<div class='tajyo_photo'><img src='" + pictureUrl + "' alt='" + playerName + "'></div>" 252 + "</div>" 253 + "</div>"); 254 } 255 256 }); 257}
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.