文字列管理を分離
This commit is contained in:
parent
8e0f04c5b2
commit
ea4fa46fe0
@ -1067,6 +1067,7 @@ export const injectJavascriptData: InjectJavascriptData = (
|
||||
`;
|
||||
|
||||
const normal_train_name = `
|
||||
const nameReplace = (列車名データ,列番データ,行き先情報) =>{
|
||||
if(列車名データ.match("サンポート")){
|
||||
const textBase = 列車名データ.split(":")[1];
|
||||
行き先情報.innerText = textBase+行き先情報.innerText;
|
||||
@ -1185,7 +1186,9 @@ const data = getJRF(列番データ);
|
||||
}
|
||||
}
|
||||
行き先情報.innerText = getThrew(列番データ) || 行き先情報.innerText;
|
||||
|
||||
//列番付与
|
||||
行き先情報.innerText = 行き先情報.innerText+列番データ+(JRF ? "":"レ");
|
||||
}
|
||||
`;
|
||||
|
||||
const textInsert =
|
||||
@ -1205,12 +1208,8 @@ const setStrings = () =>{
|
||||
var TrainType = undefined;
|
||||
setTrainMenuDialog(element)
|
||||
if(行き先情報.innerText.includes(列番データ))continue; //回避
|
||||
` +
|
||||
(iconSetting == "true" ? "setTrainIcon(列番データ,element);" : "") +
|
||||
normal_train_name +
|
||||
`
|
||||
//列番付与
|
||||
行き先情報.innerText = 行き先情報.innerText+列番データ+(JRF ? "":"レ");
|
||||
${iconSetting == "true" ? "setTrainIcon(列番データ,element);" : ""}
|
||||
nameReplace(列車名データ,列番データ,行き先情報);
|
||||
}
|
||||
try{
|
||||
for(let d of document.getElementById('disp').childNodes){
|
||||
@ -1315,7 +1314,6 @@ const makeTrainView = new MutationObserver( (mutations) => {
|
||||
d.onclick = () => window.ReactNativeWebView.postMessage(data)
|
||||
}
|
||||
});
|
||||
|
||||
// 監視を開始
|
||||
makeTrainView.observe(document.getElementById('modal_content'), {
|
||||
//attributes: true, // 属性変化の監視
|
||||
@ -1403,6 +1401,7 @@ setStationMenuDialog.observe(document.querySelector('#disp'), {
|
||||
bootData +
|
||||
topMenu +
|
||||
trainIcon +
|
||||
normal_train_name +
|
||||
makeTrainView +
|
||||
makeTrainMenu +
|
||||
textInsert +
|
||||
|
Loading…
Reference in New Issue
Block a user