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