内容の結合
This commit is contained in:
parent
3976552e43
commit
e7cecd38c1
@ -26,21 +26,21 @@ export const injectJavascriptData: InjectJavascriptData = (
|
||||
document.querySelector('#headerStr').style.display = 'none';
|
||||
`;
|
||||
|
||||
// 何これ
|
||||
// 上部ヘッダーの取り扱い、自動再読み込み、setStringsの実行
|
||||
const bootData = `
|
||||
const setReload = () =>{
|
||||
try{
|
||||
document.getElementById('refreshIcon').click();
|
||||
setStrings();
|
||||
}catch{
|
||||
|
||||
}
|
||||
}catch(error){}
|
||||
setTimeout(setReload, 10000);
|
||||
}
|
||||
setReload();
|
||||
`;
|
||||
// 左か右かを判定してアイコンを設置する
|
||||
const trainIconMaker = `
|
||||
const trainIcon =
|
||||
iconSetting == "true"
|
||||
? `
|
||||
const setStationIcon = (setIconElem,img) =>{
|
||||
if(setIconElem.getAttribute("style").includes("left")){
|
||||
setIconElem.insertAdjacentHTML('beforebegin', "<img src="+img+" style='float:left;height:20px;'>");
|
||||
@ -50,11 +50,7 @@ export const injectJavascriptData: InjectJavascriptData = (
|
||||
}
|
||||
setIconElem.remove();
|
||||
}
|
||||
`;
|
||||
|
||||
const trainIcon =
|
||||
iconSetting == "true"
|
||||
? `
|
||||
|
||||
switch(列番データ){
|
||||
//しおかぜメイン
|
||||
//8000 ノーマル
|
||||
@ -1313,10 +1309,9 @@ textInsert.observe(document.getElementById('disp'), {
|
||||
});
|
||||
`;
|
||||
|
||||
// 列車メニュー表示の起動用スクリプト
|
||||
const makeTrainView = `
|
||||
|
||||
const makeTrainView = new MutationObserver( (mutations) => {
|
||||
|
||||
for(let d of modal_content.getElementsByTagName("button") ){
|
||||
const data = d.onclick.toString().split("\\"")[1];
|
||||
d.onclick = () => window.ReactNativeWebView.postMessage(data)
|
||||
@ -1410,7 +1405,6 @@ setStationMenuDialog.observe(document.querySelector('#disp'), {
|
||||
bootData +
|
||||
topMenu +
|
||||
makeTrainView +
|
||||
trainIconMaker +
|
||||
makeTrainMenu +
|
||||
textInsert +
|
||||
makeStationMenu
|
||||
|
Loading…
Reference in New Issue
Block a user