停止中表示を改良
This commit is contained in:
parent
4744d5f4e0
commit
2b9553a45b
@ -47,12 +47,8 @@ export const injectJavascriptData: InjectJavascriptData = (
|
||||
// 左か右かを判定してアイコンを設置する
|
||||
const trainIcon = `
|
||||
const setStationIcon = (setIconElem,img,hasProblem) =>{
|
||||
if(setIconElem.getAttribute("style").includes("left")){
|
||||
setIconElem.insertAdjacentHTML('beforebegin', "<img src="+img+" style='float:left;height:20px; background-color: "+(hasProblem ? 'black' : 'white')+";'>");
|
||||
}
|
||||
else{
|
||||
setIconElem.insertAdjacentHTML('beforebegin', "<img src="+img+" style='float:right;height:20px; background-color: "+(hasProblem ? 'black' : 'white')+";'>");
|
||||
}
|
||||
const position = setIconElem.getAttribute("style").includes("left");
|
||||
setIconElem.insertAdjacentHTML('beforebegin', "<img src="+img+" style='float:"+(position ? 'left' : 'right')+";height:20px;'>");
|
||||
setIconElem.remove();
|
||||
}
|
||||
const setTrainIcon = (列番データ,e,hasProblem) =>{
|
||||
@ -1263,8 +1259,9 @@ export const injectJavascriptData: InjectJavascriptData = (
|
||||
const returnText1 = (isWanman ? "ワンマン " : "") + trainName + viaData;
|
||||
const returnText2 = (ToData ? ToData+"行 " : ToData)+ TrainNumber;
|
||||
行き先情報.innerText = "";
|
||||
行き先情報.insertAdjacentHTML('beforebegin', "<p style='font-size:10px;font-weight:bold;padding:0;color:" + (hasProblem ? "red" : "black") + ";background-color:"+ (hasProblem ? "black" : "unset") +";'>" + returnText1 + (hasProblem ? "\[停止中\]" : "") + "</p>");
|
||||
行き先情報.insertAdjacentHTML('beforebegin', "<div style='display:inline-flex;flex-direction:row;'><p style='font-size:10px;font-weight: bold;padding:0;color:" + (hasProblem ? "red" : "black") + ";background-color:"+ (hasProblem ? "black" : "unset") +";'>" + (ToData ? ToData + "行 " : ToData) + "</p><p style='font-size:10px;padding:0;color:" + (hasProblem ? "red" : "black") + ";background-color:"+ (hasProblem ? "black" : "unset") +";'>" + TrainNumber + (JRF ? "":"レ") + "</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>");
|
||||
行き先情報.insertAdjacentHTML('beforebegin', "<p style='font-size:10px;font-weight:bold;padding:0;color: "+(hasProblem ? "red":"black")+";'>" + (hasProblem ? "‼️停止中‼️" : "") + "</p>");
|
||||
}
|
||||
`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user