PageSourceSearch

https://www.boatrace-toda.jp/assets/js/race_table_point.js?ver=02

js boatrace-toda.jp collected 2026-10-02 11:15:07 UTC 7,228 bytes, 166 lines download raw bytes

1// =========================================
2// 得点率早見表
3// =========================================
4
5//グローバル関数
6var xmlRaceTablePoint = null;
7
8// ファイルロード時に関数を読み込む
9$(document).ready( function(){
10  // テーブルの値の変更はクリック時に行う ファイルロード時に呼び出しても動作しない
11  // 出走表 得点率早見表を表示する為の関数
12  $(document).on("click",  "#act01-07", function(){
13    getXmlRaceTablePoint();
14  });
15
16});
17
18
19//運用ファイル取得
20function getXmlRaceTablePoint() {
21    //システム用XML取得
22    download('./xml/kaisai/' + DATE + '/race_table_point_' + zero2(RACE_NO) + '.xml', 'xml', function(xml) {
23    //  $("#race_table_point_message").css('z-index','-1');
24      $("#main_open_sp #disp01-07 .data_table").show();
25      $("#main_open_sp #disp01-07 #point_message").hide();
26
27      $("#main_open_pc #disp01-07 .data_table").show();
28      $("#main_open_pc #disp01-07 #point_message").hide();
29      
30      //出走表カスタマイズ表示
31      if (customCookie[12] == "") {
32          $(".tokuten-view").show();
33      }
34      
35      if (KEK_R["race" + zero2(RACE_NO)] == "1") {
36        $("#main_open_sp #disp01-07 .data_table").hide();
37        $("#main_open_sp #disp01-07 #point_message").show();
38  
39        $("#main_open_pc #disp01-07 .data_table").hide();
40        $("#main_open_pc #disp01-07 #point_message").show();
41        
42        $("*[name=point_message]").html("本レースは終了しました。");
43        
44        //出走表カスタマイズ非表示
45        $(".tokuten-view").hide();
46	  }
47      
48      
49      //ドキュメントを格納
50      xmlRaceTablePoint = xml;
51      setDataRaceTablePoint();
52    }, function() {
53      showRaceTablePointMessage();
54//      $("#race_table_point_message").css('z-index','2');
55      $("#main_open_sp #disp01-07 .data_table").hide();
56      $("#main_open_sp #disp01-07 #point_message").show();
57
58      $("#main_open_pc #disp01-07 .data_table").hide();
59      $("#main_open_pc #disp01-07 #point_message").show();
60
61      if (FDATE == '20231202') {
62        $("*[name=point_message]").html("今開催はチーム対抗戦のため得点率早見を使用いたしません");
63      } else {
64        $("*[name=point_message]").html("予選最終日に表示されます。");
65      }
66      
67      //出走表カスタマイズ非表示
68      $(".tokuten-view").hide();
69
70    });
71};
72
73function showRaceTablePointMessage() {
74      // データなしメッセージ表示要素の基準となる横幅
75      var sumLeft = 0;
76      var sumWidth = 0;
77
78      $("#disp01-07").find(".data_table").find("thead").find("th").each(function(i, val) {
79        // 現在の成績~早見までの幅を取得
80        if (i >= 0 && i <= 3) {
81          sumLeft += $(val).width();
82        }
83        if (i >= 4 && i <= 12) {
84          sumWidth += $(val).width();
85        }
86      });
87      $("#race_table_point_message").width(sumWidth - 20);
88      $("#race_table_point_message").css("left", sumLeft + 30);
89}
90
91function getCustomXmlRaceTablePoint() {
92  //システム用XML取得
93  download('./xml/kaisai/' + DATE + '/race_table_point_' + zero2(RACE_NO) + '.xml', 'xml', function(xml) {
94    //ドキュメントを格納
95    xmlRaceTablePoint = xml;
96    setCustomDataRaceTablePoint();
97    //出走表カスタマイズ表示
98    $(".tokuten-view").show();
99    if (KEK_R["race" + zero2(RACE_NO)] == "1") {
100      //出走表カスタマイズ非表示
101      $(".tokuten-view").hide();
102    }
103  }, function() {
104    //出走表カスタマイズ非表示
105    $(".tokuten-view").hide();
106  });
107}
108
109function setDataRaceTablePoint() {
110  const max_chaku = 6;
111  var RaceTablePoint = $(xmlRaceTablePoint).find("table").find("record");
112  $(RaceTablePoint).each(function(i, RaceTablePointInfo) {
113    $("*[name=tokuten" + (i + 1) + "]").html($(RaceTablePointInfo).find("tokuten").text());
114    $("*[name=tokutenritsu" + (i + 1) + "]").html($(RaceTablePointInfo).find("tokutenritsu").text());
115    $("*[name=rank" + (i + 1) + "]").html($(RaceTablePointInfo).find("rank").text());
116    $("*[name=hitsuyou" + (i + 1) + "]").html($(RaceTablePointInfo).find("hitsuyou").text());
117    
118    for(var chaku=1; chaku<=max_chaku; chaku++){
119      var kaku = $(RaceTablePointInfo).find("kaku" + chaku).text();
120      if(kaku == 1) {
121        $("*[name='point" + chaku + "_" + (i + 1) + "']").removeClass("bg_kessyo_g");
122        $("*[name='point" + chaku + "_" + (i + 1) + "']").addClass("bg_kessyo_y");
123      } else if(kaku == 2) {
124        $("*[name='point" + chaku + "_" + (i + 1) + "']").removeClass("bg_kessyo_y");
125        $("*[name='point" + chaku + "_" + (i + 1) + "']").addClass("bg_kessyo_g");
126      } else {
127        $("*[name='point" + chaku + "_" + (i + 1) + "']").removeClass("bg_kessyo_y");
128        $("*[name='point" + chaku + "_" + (i + 1) + "']").removeClass("bg_kessyo_g");
129      }
130      $("*[name='point" + chaku + "_" + (i + 1) + "']").html($(RaceTablePointInfo).find("point" + chaku).text());
131    }
132  });
133}
134
135function setCustomDataRaceTablePoint() {
136  const max_chaku = 6;
137  var RaceTablePoint = $(xmlRaceTablePoint).find("table").find("record");
138  $(RaceTablePoint).each(function(i, RaceTablePointInfo) {
139    $("*[name=tokuten" + (i + 1) + "]").html($(RaceTablePointInfo).find("tokuten").text());
140    $("*[name=tokutenritsu" + (i + 1) + "]").html($(RaceTablePointInfo).find("tokutenritsu").text());
141    $("*[name=rank" + (i + 1) + "]").html($(RaceTablePointInfo).find("rank").text());
142    $("*[name=hitsuyou" + (i + 1) + "]").html($(RaceTablePointInfo).find("hitsuyou").text());
143    $("*[name=point1_" + (i + 1) + "]").html($(RaceTablePointInfo).find("point1").text());
144    $("*[name=point2_" + (i + 1) + "]").html($(RaceTablePointInfo).find("point2").text());
145    $("*[name=point3_" + (i + 1) + "]").html($(RaceTablePointInfo).find("point3").text());
146    $("*[name=point4_" + (i + 1) + "]").html($(RaceTablePointInfo).find("point4").text());
147    $("*[name=point5_" + (i + 1) + "]").html($(RaceTablePointInfo).find("point5").text());
148    $("*[name=point6_" + (i + 1) + "]").html($(RaceTablePointInfo).find("point6").text());
149    
150    //早見表の確定枠と可能性ありの枠に色を付ける
151    for(var chaku=1; chaku<=max_chaku; chaku++){
152      var kaku = $(RaceTablePointInfo).find("kaku" + chaku).text();
153      if(kaku == 1) {
154        $("*[name='point" + chaku + "_" + (i + 1) + "']").removeClass("bg_kessyo_g");
155        $("*[name='point" + chaku + "_" + (i + 1) + "']").addClass("bg_kessyo_y");
156      } else if(kaku == 2) {
157        $("*[name='point" + chaku + "_" + (i + 1) + "']").removeClass("bg_kessyo_y");
158        $("*[name='point" + chaku + "_" + (i + 1) + "']").addClass("bg_kessyo_g");
159      } else {
160        $("*[name='point" + chaku + "_" + (i + 1) + "']").removeClass("bg_kessyo_y");
161        $("*[name='point" + chaku + "_" + (i + 1) + "']").removeClass("bg_kessyo_g");
162      }
163      $("*[name='point" + chaku + "_" + (i + 1) + "']").html($(RaceTablePointInfo).find("point" + chaku).text());
164    }
165  });
166}

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.