貨物の項目リファクタリング

This commit is contained in:
harukin-OneMix4 2023-06-27 01:02:48 +09:00
parent df7608acaf
commit 6f7f02e4fa

View File

@ -498,49 +498,42 @@ export const injectJavascriptData = (
const JRF_name =
`
let JRF = false;
switch(列番データ){
case "71":
行き先情報.innerText = "東京(タ)→高松(タ)"+"\\n"+行き先情報.innerText;
break;
case "73":
case "75":
行き先情報.innerText = "大阪(タ)→高松(タ)"+"\\n"+行き先情報.innerText;
break;
case "3079":
行き先情報.innerText = "高松(タ)→伊予三島"+"\\n"+行き先情報.innerText;
break;
case "3071":
case "3077":
行き先情報.innerText = "高松(タ)→新居浜"+"\\n"+行き先情報.innerText;
break;
case "3073":
行き先情報.innerText = "高松(タ)→松山貨物"+"\\n"+行き先情報.innerText;
break;
case "70":
行き先情報.innerText = "高松(タ)→東京(タ)"+"\\n"+行き先情報.innerText;
break;
case "74":
case "76":
行き先情報.innerText = "高松(タ)→大阪(タ)"+"\\n"+行き先情報.innerText;
break;
case "3078":
行き先情報.innerText = "伊予三島→高松(タ)"+"\\n"+行き先情報.innerText;
break;
case "3070":
行き先情報.innerText = "新居浜→高松(タ)"+"\\n"+行き先情報.innerText;
break;
case "3076":
行き先情報.innerText = "新居浜→高松(タ)"+"\\n"+行き先情報.innerText;
break;
case "3072":
行き先情報.innerText = "松山貨物→高松(タ)"+"\\n"+行き先情報.innerText;
break;
case "9070":
行き先情報.innerText = "臨時貨物"+"\\n"+行き先情報.innerText;
break;
default:
JRF = true;
const getJRF = num =>{
switch(列番データ){
case "71":
return "東京(タ)→高松(タ)"+"\\n";
case "73":
case "75":
return "大阪(タ)→高松(タ)"+"\\n";
case "3079":
return "高松(タ)→伊予三島"+"\\n";
case "3071":
case "3077":
return "高松(タ)→新居浜"+"\\n";
case "3073":
return "高松(タ)→松山貨物"+"\\n";
case "70":
return "高松(タ)→東京(タ)"+"\\n";
case "74":
case "76":
return "高松(タ)→大阪(タ)"+"\\n";
case "3078":
return "伊予三島→高松(タ)"+"\\n";
case "3070":
return "新居浜→高松(タ)"+"\\n";
case "3076":
return "新居浜→高松(タ)"+"\\n";
case "3072":
return "松山貨物→高松(タ)"+"\\n";
case "9070":
return "臨時貨物"+"\\n";
default:
JRF = true;
return "";
}
}
行き先情報.innerText = getJRF(列番データ)+行き先情報.innerText;
` + JRF_icon;
const TKT_name = `