isWanmanを基本的に無効化(種別判定を有効化)、予土線の直通ラインカラーを実装、特定期間有効アイコンをコミュニティアイコンみたく実装
This commit is contained in:
@@ -676,6 +676,7 @@ export const injectJavascriptData: InjectJavascriptData = (
|
||||
let ToData = "";
|
||||
let TrainNumber = 列番データ;
|
||||
let isEdit = false;
|
||||
let isSeason = false;
|
||||
|
||||
try{
|
||||
const diagram = trainDiagramData2[列番データ] || trainTimeInfo[列番データ];
|
||||
@@ -885,47 +886,59 @@ export const injectJavascriptData: InjectJavascriptData = (
|
||||
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 "Freight":
|
||||
trainTypeColor = "#00869ecc";
|
||||
isWanman = false;
|
||||
return "貨物";
|
||||
case "Forwarding":
|
||||
trainTypeColor = "#727272cc";
|
||||
isWanman = false;
|
||||
return "回送";
|
||||
case "FreightForwarding":
|
||||
trainTypeColor = "#727272cc";
|
||||
isWanman = false;
|
||||
return "単機回送";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
})();
|
||||
isWanman = data.isWanman;
|
||||
isEdit = data.isEdit;
|
||||
isSeason = data.isSeason;
|
||||
if(data.trainName != ""){
|
||||
trainName = data.trainName;
|
||||
if(data.trainNumDistance != null){
|
||||
@@ -979,13 +992,16 @@ export const injectJavascriptData: InjectJavascriptData = (
|
||||
case "鳴門線直通":
|
||||
yosan2Color = "#881F61";
|
||||
break;
|
||||
case "予土線":
|
||||
yosan2Color = "#008a5a";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
const gradient = getColors.length > 1 ? "linear-gradient(130deg, " + getColors[0] + " 0%, "+ getColors[0]+"50%, "+ getColors[1]+"50%, " + getColors[1] + " 100%)" : getColors[0];
|
||||
|
||||
行き先情報.insertAdjacentHTML('beforebegin', "<div style='width:100%;display:flex;flex:1;flex-direction:"+(isLeft ? "column-reverse" : "column") + ";'>"+( isEdit ? "<div style='position:absolute;"+ (isLeft ? "right" : "left") + ":0;"+ (isLeft ? "bottom" : "top") + ":0;background-color:#00b8bb;border-radius:15px;padding:0px;padding-left:4px;padding-right:4px;'><i class='fa-solid fa-user-group fa-sm' style='color:white;width:100%;height:100%;'></i></div>" : "")+"<p style='font-size:6px;padding:0;color:black;text-align:center;'>" + TrainNumber + (JRF ? "":"レ") + "</p><div style='flex:1;'></div><p style='font-size:8px;font-weight:bold;padding:0;color: black;text-align:center;'>" + (isWanman ? "ワンマン " : "") + "</p><p style='font-size:6px;font-weight:bold;padding:0;color: black;text-align:center;border-style:solid;border-width: "+(!!yosan2Color ? "2px" : "0px")+";border-color:" + yosan2Color + "'>" + viaData + "</p><p style='font-size:8px;font-weight:bold;padding:0;color: black;text-align:center;'>" + trainName + "</p><div style='width:100%;background:" + gradient + ";'><p style='font-size:10px;font-weight:bold;padding:0;margin:0;color:white;align-items:center;align-content:center;text-align:center;text-shadow:1px 1px 0px #00000030, -1px -1px 0px #00000030,-1px 1px 0px #00000030, 1px -1px 0px #00000030,1px 0px 0px #00000030, -1px 0px 0px #00000030,0px 1px 0px #00000030, 0px -1px 0px #00000030;'>" + (ToData ? ToData + "行" : ToData) + "</p></div><div style='width:100%;background:" + trainTypeColor + ";border-radius:"+(isLeft ? "4px 4px 0 0" : "0 0 4px 4px")+";'><p style='font-size:10px;font-weight:bold;font-style:italic;padding:0;color: white;text-align:center;'>" + trainType + "</p></div><p style='font-size:8px;font-weight:bold;padding:0;text-align:center;color: "+(hasProblem ? "red":"black")+";'>" + (hasProblem ? "‼️停止中‼️" : "") + "</p></div>");
|
||||
行き先情報.insertAdjacentHTML('beforebegin', "<div style='width:100%;display:flex;flex:1;flex-direction:"+(isLeft ? "column-reverse" : "column") + ";'>"+( isEdit ? "<div style='position:absolute;"+ (isLeft ? "right" : "left") + ":0;"+ (isLeft ? "bottom" : "top") + ":0;background-color:#00b8bb;border-radius:15px;padding:0px;padding-left:4px;padding-right:4px;'><i class='fa-solid fa-user-group fa-sm' style='color:white;width:100%;height:100%;'></i></div>" : isSeason ? "<div style='position:absolute;"+ (isLeft ? "right" : "left") + ":0;"+ (isLeft ? "bottom" : "top") + ":0;background-color:#00b8bb;border-radius:15px;padding:0px;padding-left:4px;padding-right:4px;'><i class='fa-solid fa-calendar fa-sm' style='color:white;width:100%;height:100%;'></i></div>" : "")+"<p style='font-size:6px;padding:0;color:black;text-align:center;'>" + TrainNumber + (JRF ? "":"レ") + "</p><div style='flex:1;'></div><p style='font-size:8px;font-weight:bold;padding:0;color: black;text-align:center;'>" + (isWanman ? "ワンマン " : "") + "</p><p style='font-size:6px;font-weight:bold;padding:0;color: black;text-align:center;border-style:solid;border-width: "+(!!yosan2Color ? "2px" : "0px")+";border-color:" + yosan2Color + "'>" + viaData + "</p><p style='font-size:8px;font-weight:bold;padding:0;color: black;text-align:center;'>" + trainName + "</p><div style='width:100%;background:" + gradient + ";'><p style='font-size:10px;font-weight:bold;padding:0;margin:0;color:white;align-items:center;align-content:center;text-align:center;text-shadow:1px 1px 0px #00000030, -1px -1px 0px #00000030,-1px 1px 0px #00000030, 1px -1px 0px #00000030,1px 0px 0px #00000030, -1px 0px 0px #00000030,0px 1px 0px #00000030, 0px -1px 0px #00000030;'>" + (ToData ? ToData + "行" : ToData) + "</p></div><div style='width:100%;background:" + trainTypeColor + ";border-radius:"+(isLeft ? "4px 4px 0 0" : "0 0 4px 4px")+";'><p style='font-size:10px;font-weight:bold;font-style:italic;padding:0;color: white;text-align:center;'>" + trainType + "</p></div><p style='font-size:8px;font-weight:bold;padding:0;text-align:center;color: "+(hasProblem ? "red":"black")+";'>" + (hasProblem ? "‼️停止中‼️" : "") + "</p></div>");
|
||||
`: `
|
||||
行き先情報.insertAdjacentHTML('beforebegin', "<p style='font-size:10px;font-weight:bold;padding:0;color: black;'>" + returnText1 + "</p>");
|
||||
行き先情報.insertAdjacentHTML('beforebegin', "<div style='display:inline-flex;flex-direction:row;'><p style='font-size:10px;font-weight: bold;padding:0;color:black;'>" + (ToData ? ToData + "行 " : ToData) + "</p><p style='font-size:10px;padding:0;color:black;'>" + TrainNumber + (JRF ? "":"レ") + "</p></div>");
|
||||
|
Reference in New Issue
Block a user