JRFの削除

This commit is contained in:
harukin-expo-dev-env
2025-08-22 11:36:31 +00:00
parent 7814037d2a
commit 46cff473e6
+85 -143
View File
@@ -634,39 +634,6 @@ export const injectJavascriptData: InjectJavascriptData = (
`;
const normal_train_name = `
const getJRF = num =>{
switch(num){
case "71":
return "東京(タ)→高松(タ)";
case "73":
case "75":
return "大阪(タ)→高松(タ)";
case "3079":
return "高松(タ)→伊予三島";
case "3071":
case "3077":
return "高松(タ)→新居浜";
case "3073":
return "高松(タ)→松山貨物";
case "70":
return "高松(タ)→東京(タ)";
case "74":
case "76":
return "高松(タ)→大阪(タ)";
case "3078":
return "伊予三島→高松(タ)";
case "3070":
return "新居浜→高松(タ)";
case "3076":
return "新居浜→高松(タ)";
case "3072":
return "松山貨物→高松(タ)";
case "9070":
return "臨時貨物";
default:
return undefined;
}
}
const nameReplace = (列車名データ,列番データ,行き先情報,hasProblem,isLeft) =>{
let isWanman = false;
let trainName = "";
@@ -724,15 +691,6 @@ export const injectJavascriptData: InjectJavascriptData = (
trainName = "臨時列車";
}
let JRF = true;
const JRFTemp = getJRF(列番データ);
if(JRFTemp){
trainName = JRFTemp;
JRF = false;
}
const getThrew = num =>{
switch(num){
@@ -833,30 +791,6 @@ export const injectJavascriptData: InjectJavascriptData = (
viaData = "ごめん・なはり線[快速]";
ToData = "(後免にて解結)\\n土佐山田/奈半利";
break;
case "9395D":
viaData = "[臨時]普通";
ToData = "三本松";
break;
case "9174M":
viaData = "[臨時]マリンライナー94号";
ToData = "岡山";
break;
case "9662D":
viaData = "[臨時]れんげ号";
ToData = "八幡浜";
break;
case "9665D":
viaData = "[臨時]れんげ号";
ToData = "宇和島";
break;
case "9664D":
viaData = "[臨時]わらぐろ号";
ToData = "八幡浜";
break;
case "9663D":
viaData = "[臨時]わらぐろ号";
ToData = "卯之町";
break;
default:
if(new RegExp(/^58[1-3][1,3,5,7,9][DM]$/).test(列番データ)){
viaData = "ごめん・なはり線[快速]";
@@ -882,65 +816,77 @@ export const injectJavascriptData: InjectJavascriptData = (
if(trainDataList.find(e => e.id === 列番データ) !== undefined){
const data = trainDataList.find(e => e.id === 列番データ);
//{id,trainName,viaData,ToData,TrainNumber,TrainNumberOverride,type,infoUrl,trainNumDistance,info,infogram,isEdit}
trainType = (()=>{
switch(data.type){
case "Normal":
trainTypeColor = "black";
isWanman = false;
return "普通";
case "OneMan":
trainTypeColor = "black";
isWanman = true;
return "普通";
case "Rapid":
trainTypeColor = "rgba(0, 140, 255, 1)";
isWanman = false;
return "快速";
case "OneManRapid":
trainTypeColor = "rgba(0, 140, 255, 1)";
isWanman = true;
return "快速";
case "LTDEXP":
trainTypeColor = "red";
isWanman = false;
return "特急";
case "NightLTDEXP":
trainTypeColor = "#d300b0ff";
isWanman = false;
return "寝台特急";
case "SPCL":
case "SPCL_Normal":
trainTypeColor = "#008d07ff";
isWanman = false;
return "臨時";
case "SPCL_Rapid":
trainTypeColor = "rgba(0, 81, 255, 1)";
isWanman = false;
return "臨時快速";
case "SPCL_EXP":
trainTypeColor = "#a52e2eff";
isWanman = false;
return "臨時特急";
case "Party":
trainTypeColor = "#ff7300ff";
isWanman = false;
return "団体臨時";
case "Freight":
trainTypeColor = "#00869ecc";
isWanman = false;
return "貨物";
case "Forwarding":
trainTypeColor = "#727272cc";
isWanman = false;
return "回送";
case "FreightForwarding":
trainTypeColor = "#727272cc";
isWanman = false;
return "単機回送";
default:
return "";
}
})();
switch(data.type){
case "Normal":
trainTypeColor = "black";
isWanman = false;
trainType = "普通";
break;
case "OneMan":
trainTypeColor = "black";
isWanman = true;
trainType = "普通";
break;
case "Rapid":
trainTypeColor = "rgba(0, 140, 255, 1)";
isWanman = false;
trainType = "快速";
break;
case "OneManRapid":
trainTypeColor = "rgba(0, 140, 255, 1)";
isWanman = true;
trainType = "快速";
break;
case "LTDEXP":
trainTypeColor = "red";
isWanman = false;
trainType = "特急";
break;
case "NightLTDEXP":
trainTypeColor = "#d300b0ff";
isWanman = false;
trainType = "寝台特急";
break;
case "SPCL":
case "SPCL_Normal":
trainTypeColor = "#008d07ff";
isWanman = false;
trainType = "臨時";
break;
case "SPCL_Rapid":
trainTypeColor = "rgba(0, 81, 255, 1)";
isWanman = false;
trainType = "臨時快速";
break;
case "SPCL_EXP":
trainTypeColor = "#a52e2eff";
isWanman = false;
trainType = "臨時特急";
break;
case "Party":
trainTypeColor = "#ff7300ff";
isWanman = false;
trainType = "団体臨時";
break;
case "Freight":
trainTypeColor = "#00869ecc";
isWanman = false;
trainType = "貨物";
break;
case "Forwarding":
trainTypeColor = "#727272cc";
isWanman = false;
trainType = "回送";
break;
case "FreightForwarding":
trainTypeColor = "#727272cc";
isWanman = false;
trainType = "単機回送";
break;
default:
break;
}
isEdit = data.isEdit;
isSeason = data.isSeason;
if(data.trainName != ""){
@@ -1022,51 +968,45 @@ export const injectJavascriptData: InjectJavascriptData = (
const setNewTrainItem = (element,hasProblem,type)=>{
var 列番データ = element.getAttribute('offclick').split('"')[1];
const JRFTemp = getJRF(列番データ);
switch(true){
case 列番データ.indexOf("H") != -1:
case 列番データ.indexOf("R") != -1:
case 列番データ.indexOf("E") != -1:
case 列番データ.indexOf("A") != -1:
case 列番データ.indexOf("B") != -1:
case 列番データ.indexOf("T") != -1:
case !!JRFTemp:
element.style.backgroundColor = '#c7c7c7cc';
break;
default:
element.style.backgroundColor = '#ffffffcc';
break;
}
if(trainDataList.find(e => e.id === 列番データ) !== undefined){
const data = trainDataList.find(e => e.id === 列番データ);
switch (data.type) {
case "Normal":
element.style.borderColor = "black";
element.style.backgroundColor = '#ffffffcc';
break;
case "OneMan":
element.style.borderColor = "black";
element.style.backgroundColor = '#ffffffcc';
break;
case "Rapid":
element.style.borderColor = "rgba(0, 140, 255, 1)";
element.style.backgroundColor = '#ffffffcc';
break;
case "OneManRapid":
element.style.borderColor = "rgba(0, 140, 255, 1)";
element.style.backgroundColor = '#ffffffcc';
break;
case "LTDEXP":
element.style.borderColor = "red";
element.style.backgroundColor = '#ffffffcc';
break;
case "NightLTDEXP":
element.style.borderColor = "#d300b0ff";
element.style.backgroundColor = '#ffffffcc';
break;
case "SPCL":
case "SPCL_Normal":
element.style.borderColor = "#008d07ff";
element.style.backgroundColor = '#ffffffcc';
break;
case "SPCL_Rapid":
element.style.borderColor = "rgba(0, 81, 255, 1)";
element.style.borderColor = "#0051ffff";
element.style.backgroundColor = '#ffffffcc';
break;
case "SPCL_EXP":
element.style.borderColor = "#a52e2eff";
element.style.backgroundColor = '#ffffffcc';
break;
case "Party":
element.style.borderColor = "#ff7300ff";
@@ -1074,15 +1014,19 @@ const setNewTrainItem = (element,hasProblem,type)=>{
break;
case "Freight":
element.style.borderColor = "#00869ecc";
element.style.backgroundColor = '#c7c7c7cc';
break;
case "Forwarding":
element.style.borderColor = "#727272cc";
element.style.backgroundColor = '#c7c7c7cc';
break;
case "FreightForwarding":
element.style.borderColor = "#727272cc";
element.style.backgroundColor = '#c7c7c7cc';
break;
default:
element.style.borderColor = 'black';
element.style.backgroundColor = '#ffffffcc';
break;
}
}else{
@@ -1090,8 +1034,6 @@ const setNewTrainItem = (element,hasProblem,type)=>{
element.style.borderColor = '#ff0000ff';
}else if(element.getAttribute('offclick').includes("rapid")){
element.style.borderColor = '#008cffff';
}else if(JRFTemp){
element.style.borderColor = '#00869ecc';
}else{
element.style.borderColor = 'black';
}