小整理
This commit is contained in:
parent
4ef5a13dc3
commit
1aac1e40df
@ -19,6 +19,8 @@ export const injectJavascriptData = (
|
|||||||
document.querySelector('#main').style.paddingTop = '0px';
|
document.querySelector('#main').style.paddingTop = '0px';
|
||||||
document.querySelector('#headerStr').style.display = 'none';
|
document.querySelector('#headerStr').style.display = 'none';
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
// 何これ
|
||||||
const bootData =
|
const bootData =
|
||||||
topMenu +
|
topMenu +
|
||||||
`
|
`
|
||||||
@ -33,17 +35,16 @@ export const injectJavascriptData = (
|
|||||||
}
|
}
|
||||||
setReload();
|
setReload();
|
||||||
`;
|
`;
|
||||||
|
// 左か右かを判定してアイコンを設置する
|
||||||
const trainIconMaker = `
|
const trainIconMaker = `
|
||||||
const setStationIcon = (行き先アイコン,img) =>{
|
const setStationIcon = (setIconElem,img) =>{
|
||||||
let newItem = document.createElement("div");
|
if(setIconElem.getAttribute("style").includes("left")){
|
||||||
if(行き先アイコン.getAttribute("style").includes("left")){
|
setIconElem.insertAdjacentHTML('beforebegin', "<img src="+img+" style='float:left;height:20px;'>");
|
||||||
行き先アイコン.insertAdjacentHTML('beforebegin', "<img src="+img+" style='float:left;height:20px;'>");
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
行き先アイコン.insertAdjacentHTML('beforebegin', "<img src="+img+" style='float:right;height:20px;'>");
|
setIconElem.insertAdjacentHTML('beforebegin', "<img src="+img+" style='float:right;height:20px;'>");
|
||||||
}
|
}
|
||||||
行き先アイコン.remove();
|
setIconElem.remove();
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -471,9 +472,7 @@ default:
|
|||||||
|
|
||||||
const JRF_icon =
|
const JRF_icon =
|
||||||
iconSetting == "true"
|
iconSetting == "true"
|
||||||
? `
|
? `JRF || setStationIcon(element.querySelector("img"),'http://www.trainfrontview.net/f/ef210a.png');`
|
||||||
JRF || setStationIcon(element.querySelector("img"),'http://www.trainfrontview.net/f/ef210a.png');
|
|
||||||
`
|
|
||||||
: ``;
|
: ``;
|
||||||
const normal_train_name = `
|
const normal_train_name = `
|
||||||
if(new RegExp(/^4[1-9]\\d\\d[DM]$/).test(列番データ) || new RegExp(/^5[1-7]\\d\\d[DM]$/).test(列番データ)){
|
if(new RegExp(/^4[1-9]\\d\\d[DM]$/).test(列番データ) || new RegExp(/^5[1-7]\\d\\d[DM]$/).test(列番データ)){
|
||||||
@ -678,8 +677,6 @@ document.querySelectorAll('#disp div')[0].style.width = '100vw';
|
|||||||
document.getElementById('disp').style.width = '100vw';
|
document.getElementById('disp').style.width = '100vw';
|
||||||
document.getElementById('disp').style.overflowX = 'hidden';
|
document.getElementById('disp').style.overflowX = 'hidden';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}catch(e){
|
}catch(e){
|
||||||
alert("にゃーん");
|
alert("にゃーん");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user