駅名標をAndroidで表示できなくなっていた問題を修正
This commit is contained in:
parent
84efa42e57
commit
0ff05f911c
@ -721,11 +721,46 @@ modal_observer.observe(modal_content, {
|
|||||||
//trainMenu == "true"
|
//trainMenu == "true"
|
||||||
true
|
true
|
||||||
? `
|
? `
|
||||||
function ShowTrainTimeInfo(trainNum,limited){
|
//駅メニューダイアログの配置
|
||||||
window.ReactNativeWebView.postMessage(JSON.stringify({type:"ShowTrainTimeInfo",trainNum,limited}));
|
const setStationMenuDialog = () =>{
|
||||||
};
|
const data =[];
|
||||||
`
|
document.querySelectorAll('#disp div div').forEach(d=>d.id.indexOf("st")!= -1 && data.push(d));
|
||||||
: ``;
|
|
||||||
|
for(let d of data ){
|
||||||
|
if(!d.offclick){
|
||||||
|
d.offclick = d.onclick.toString();
|
||||||
|
}
|
||||||
|
d.onclick = () =>{
|
||||||
|
//const s = d.offclick.replace('function onclick(event)','').replace('ShowTrainTimeInfo(','').replace(')','').split('(')[1].split(',')
|
||||||
|
// これの中身抽出ShowTrainTimeInfo("1228M","normal")
|
||||||
|
const s = d.offclick.replace('(event)','').replaceAll("'", "").split('(')[1].split(')')[0].split(',');
|
||||||
|
// これの中身抽出 PopUpMenu(event,'2','端岡','http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/hashioka.pdf','https://www.google.co.jp/maps/place/34.305027,133.967643','','1')
|
||||||
|
window.ReactNativeWebView.postMessage(JSON.stringify({type:"PopUpMenu",event:s[0],id:s[1],name:s[2],pdf:s[3],map:s[4],url:s[5],chk:s[6]}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const observer3 = new MutationObserver( (mutations) => {
|
||||||
|
// observer3.disconnect(); // 監視を終了
|
||||||
|
setStationMenuDialog();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 監視を開始
|
||||||
|
observer3.observe(target, {
|
||||||
|
attributes: true, // 属性変化の監視
|
||||||
|
//attributeOldValue: true, // 変化前の属性値を matation.oldValue に格納する
|
||||||
|
//characterData: true, // テキストノードの変化を監視
|
||||||
|
//characterDataOldValue: true, // 変化前のテキストを matation.oldValue に格納する
|
||||||
|
childList: true, // 子ノードの変化を監視
|
||||||
|
//subtree: true // 子孫ノードも監視対象に含める
|
||||||
|
});
|
||||||
|
`
|
||||||
|
: // `
|
||||||
|
// function ShowTrainTimeInfo(trainNum,limited){
|
||||||
|
// window.ReactNativeWebView.postMessage(JSON.stringify({type:"ShowTrainTimeInfo",trainNum,limited}));
|
||||||
|
// };
|
||||||
|
// `
|
||||||
|
``;
|
||||||
return (
|
return (
|
||||||
bootData +
|
bootData +
|
||||||
makeTrainView +
|
makeTrainView +
|
||||||
|
Loading…
Reference in New Issue
Block a user