Add station data, train icon mapping, and train type configuration

- Introduced `stationData.ts` to store station information including names, numbers, and features.
- Created `trainIconMap.ts` for mapping train numbers to their respective image URLs, including dynamic URLs for special trains.
- Added `trainTypeConfig.ts` to define display settings for various train types, including colors and labels for different categories.
This commit is contained in:
harukin-expo-dev-env
2026-03-02 12:38:43 +00:00
parent 413ef4acb3
commit 7004eeefad
4 changed files with 594 additions and 707 deletions

View File

@@ -1,4 +1,7 @@
import { INTERVALS, API_ENDPOINTS } from '@/constants';
import { TRAIN_TYPE_CONFIG } from './webview/trainTypeConfig';
import { TRAIN_ICON_MAP, TRAIN_ICON_REGEX } from './webview/trainIconMap';
import { STATION_DATA } from './webview/stationData';
export interface InjectJavascriptOptions {
/** 地図スイッチ ("true" | "false") */
@@ -65,6 +68,17 @@ export const injectJavascriptData = ({
let unyohubData = [];
const useUnyohubSetting = ${useUnyohub === "true"};
// 列車種別設定 (typeColor / borderColor / bgColor / label / isWanman)
const TRAIN_TYPE_CFG = ${JSON.stringify(TRAIN_TYPE_CONFIG)};
// operationList から列番が一致する運行情報を返すヘルパー
const getOperationsByTrainId = (trainId) => {
return operationList.filter(e => {
const ids = [...(e.train_ids||[]),...(e.related_train_ids||[])].map(x=>x.split(",")[0]);
return ids.includes(String(trainId));
});
};
// --- localStorage キャッシュヘルパー(起動直後の即時表示用)---
// データ種別ごとの有効期限(ミリ秒)
const CACHE_TTL = {
@@ -368,497 +382,16 @@ export const injectJavascriptData = ({
if (backCount == 0 || backCount == 100) setIconElem.remove();
}
const _TIM = ${JSON.stringify(TRAIN_ICON_MAP)};
const _TIR = ${JSON.stringify(TRAIN_ICON_REGEX)};
const _AP = "https://n8n.haruk.in/webhook/anpanman-pictures.png?trainNum=";
const setTrainIcon = (列番データ) => {
switch (列番データ) {
//しおかぜメイン
//8000 ノーマル
case "2M":
case "4M":
case "6M":
case "14M":
case "16M":
case "18M":
case "26M":
case "28M":
case "30M":
case "1M":
case "3M":
case "5M":
case "13M":
case "15M":
case "17M":
case "25M":
case "27M":
case "29M":
return "https://storage.haruk.in/s8000nr.png";
//8000 アンパン
case "10M":
case "22M":
case "9M":
case "21M":
return "https://n8n.haruk.in/webhook/anpanman-pictures.png?trainNum=" +
列番データ;
//8600
case "8M":
case "12M":
case "20M":
case "24M":
case "7M":
case "11M":
case "19M":
case "23M":
return "https://storage.haruk.in/s8600.png";
//いしづちメイン
//8000 ノーマル
case "1004M":
case "1006M":
case "1014M":
case "1016M":
case "1018M":
case "1026M":
case "1028M":
case "1030M":
case "1001M":
case "1003M":
case "1005M":
case "1013M":
case "1015M":
case "1017M":
case "1025M":
case "1027M":
case "1029M":
return "https://storage.haruk.in/s8000no.png";
//8000 アンパン
case "1010M":
case "1022M":
case "1009M":
case "1021M":
return "https://n8n.haruk.in/webhook/anpanman-pictures.png?trainNum=" +
列番データ;
//8600
case "1008M":
case "1012M":
case "1020M":
case "1024M":
case "1007M":
case "1011M":
case "1019M":
case "1023M":
return "https://storage.haruk.in/s8600_isz.png";
//MEXP
//8000
case "1092M":
return "https://storage.haruk.in/s8000nr.png";
//8600
case "1091M":
return "https://storage.haruk.in/s8600_isz.png";
//三桁いしづち
//8000 アンパン
case "1041M":
case "1044M":
return "https://n8n.haruk.in/webhook/anpanman-pictures.png?trainNum=" +
列番データ;
//8600
case "1043M":
case "1042M":
case "1046M":
return "https://storage.haruk.in/s8600_isz.png";
//南風 2700ーマル
case "34D":
case "38D":
case "40D":
case "42D":
case "46D":
case "50D":
case "52D":
case "54D":
case "58D":
case "31D":
case "35D":
case "39D":
case "41D":
case "43D":
case "47D":
case "51D":
case "53D":
case "55D":
return "https://storage.haruk.in/s2700.png";
//2700アンパン
case "32D":
case "36D":
case "44D":
case "48D":
case "56D":
case "33D":
case "37D":
case "45D":
case "49D":
case "57D":
return "https://n8n.haruk.in/webhook/anpanman-pictures.png?trainNum=" +
列番データ;
//うずしお
//2700
case "3004D":
case "3006D":
case "3010D":
case "3014D":
case "3016D":
case "3022D":
case "3028D":
case "3003D":
case "3007D":
case "3013D":
case "3019D":
case "3025D":
case "3031D":
return "https://storage.haruk.in/s2700_uzu.png";
//2700 二両編成
case "3008D":
case "3020D":
case "3026D":
case "3001D":
case "3005D":
case "3011D":
case "3017D":
case "3023D":
case "3029D":
return "https://storage.haruk.in/s2700_uzu.png";
//2600
case "3002D":
case "3012D":
case "3018D":
case "3024D":
case "3030D":
case "3009D":
case "3015D":
case "3021D":
case "3027D":
case "3033D":
return "https://storage.haruk.in/s2600.png";
//マリンライナー
case "3104M":
case "3106M":
case "3108M":
case "3110M":
case "3112M":
case "3114M":
case "3116M":
case "3118M":
case "3120M":
case "3122M":
case "3124M":
case "3126M":
case "3128M":
case "3130M":
case "3132M":
case "3134M":
case "3136M":
case "3138M":
case "3140M":
case "3142M":
case "3144M":
case "3146M":
case "3148M":
case "3150M":
case "3152M":
case "3154M":
case "3156M":
case "3158M":
case "3160M":
case "3162M":
case "3164M":
case "3166M":
case "3168M":
case "3170M":
case "3105M":
case "3107M":
case "3109M":
case "3111M":
case "3113M":
case "3115M":
case "3117M":
case "3119M":
case "3121M":
case "3123M":
case "3125M":
case "3127M":
case "3129M":
case "3131M":
case "3133M":
case "3135M":
case "3137M":
case "3139M":
case "3141M":
case "3143M":
case "3145M":
case "3147M":
case "3149M":
case "3151M":
case "3153M":
case "3155M":
case "3157M":
case "3159M":
case "3161M":
case "3163M":
case "3165M":
case "3167M":
case "3169M":
case "3175M":
return "https://storage.haruk.in/s5001.png";
case "3102M":
case "3101M":
case "3103M":
case "3171M":
case "3173M":
return "https://storage.haruk.in/s5001k.png";
//サンライズ瀬戸
case "5032M":
case "5031M":
case "8041M": //琴平延長高松迄
case "8031M": //琴平延長高松以降
return "https://storage.haruk.in/w285.png";
//宇和海
//2000 ノーマル
case "1052D":
case "1054D":
case "1056D":
case "1060D":
case "1062D":
case "1064D":
case "1068D":
case "1070D":
case "1072D":
case "1076D":
case "1078D":
case "1080D":
case "1082D":
case "1051D":
case "1055D":
case "1057D":
case "1061D":
case "1063D":
case "1065D":
case "1069D":
case "1071D":
case "1073D":
case "1075D":
case "1077D":
case "1079D":
case "1081D":
return "https://storage.haruk.in/s2000_uwa.png";
//2000 アンパン込み
case "1058D":
case "1066D":
case "1074D":
case "1053D":
case "1059D":
case "1067D":
return "https://n8n.haruk.in/webhook/anpanman-pictures.png?trainNum=" +
列番データ;
//しまんと
case "2002D":
case "2004D":
case "2001D":
case "2003D":
return "https://storage.haruk.in/s2000_smn.png";
//あしずり 2000
case "2074D":
case "2076D":
case "2080D":
case "2082D":
case "2071D":
case "2073D":
case "2079D":
case "2081D":
return "https://n8n.haruk.in/webhook/anpanman-pictures.png?trainNum=" +
列番データ;
//あしずり 2700
case "2072D":
case "2078D":
case "2084D":
case "2075D":
case "2077D":
case "2083D":
return "https://storage.haruk.in/s2700_asi.png";
//剣山
case "4002D":
case "4004D":
case "4006D":
case "4001D":
case "4003D":
case "4005D":
case "4007D":
return "https://storage.haruk.in/s185tu.png";
//よしのがわトロッコ
case "8452D":
case "8451D":
return "https://storage.haruk.in/s185to_ai.png";
//岡山高松アントロ
case "8176D":
case "8179D":
//岡山琴平アントロ
case "8277D":
case "8278D":
return "https://storage.haruk.in/s32to4.png";
//千年ものがたり
case "8021D":
case "8022D":
return "https://storage.haruk.in/s185mm1.png";
//夜明けものがたり
case "8082D":
case "8083D":
case "8073D":
case "8074D":
return "https://storage.haruk.in/s185ym1.png";
//ラマルドボア
case "9253M":
case "9256M":
return "https://storage.haruk.in/w213w.png";
// 貨物
case "74":
case "75":
case "70":
case "71":
case "73":
case "76":
case "3070":
case "3071":
case "3072":
case "3073":
case "3076":
case "3077":
case "3078":
case "3079":
case "8070":
case "8071":
case "8072":
case "8077":
return "https://storage.haruk.in/ef210a.png";
// 伊予灘ものがたり 赤
case "8091D":
case "8093D":
return "https://storage.haruk.in/s185iyor.png";
// 伊予灘ものがたり 黄
case "8092D":
case "8094D":
return "https://storage.haruk.in/s185iyoy.png";
// 高徳線、徳島線、牟岐線、鳴門線普通列車系統
// キハ40・47
case "4303D":
case "371D":
case "316D":
case "362D":
case "4376D":
case "951D":
case "953D":
case "955D":
case "973D":
case "975D":
case "977D":
case "979D":
case "981D":
case "950D":
case "968D":
case "970D":
case "972D":
case "974D":
case "976D":
case "980D":
case "982D":
return "https://storage.haruk.in/s40.png";
// 1000形
case "4311D":
case "363D":
case "356D":
case "4374D":
case "433D":
case "4447D":
case "451D":
case "450D":
case "4458D":
case "474D":
return "https://storage.haruk.in/s1000.png";
// 1200形
case "4301D":
case "4327D":
case "4329D":
case "4343D":
case "353D":
case "355D":
case "367D":
case "310D":
case "4326D":
case "4334D":
case "4342D":
case "358D":
case "364D":
case "4453D":
case "4455D":
case "4457D":
case "463D":
case "475D":
case "477D":
case "485D":
case "4430D":
case "434D":
case "438D":
case "4460D":
case "4464D":
case "4466D":
case "478D":
case "484D":
case "957D":
case "4959D":
case "4963D":
case "4967D":
case "4971D":
case "952D":
case "4954D":
case "4958D":
case "4962D":
case "4966D":
return "https://storage.haruk.in/s1200n.png";
// 半定期臨時列車
case "9174M":
return "https://storage.haruk.in/s5001.png";
case "9395D":
return "https://storage.haruk.in/s1500.png";
default: //指定車両でなく、Regexでの指定に移動
// 高徳線 普通列車系統
if (new RegExp(/^(4|5)3\\d\\dD$/).test(列番データ)) {
return "https://storage.haruk.in/s1500.png";
} else if (new RegExp(/^3\\d\\dD$/).test(列番データ)) {
return "https://storage.haruk.in/s1500.png";
} // 徳島線 普通列車系統
else if (new RegExp(/^(4|5)4\\d\\dD$/).test(列番データ)) {
return "https://storage.haruk.in/s1500.png";
} else if (new RegExp(/^4\\d\\dD$/).test(列番データ)) {
return "https://storage.haruk.in/s1500.png";
} // 鳴門線普通列車系統
else if (new RegExp(/^(4|5)9(5|6|7|8)\\dD$/).test(列番データ)) {
return "https://storage.haruk.in/s1500.png";
} else if (new RegExp(/^9(5|6|7|8)\\dD$/).test(列番データ)) {
return "https://storage.haruk.in/s1500.png";
}
break;
const _u = _TIM[列番データ];
if (_u != null) return _u === "__anpanman__" ? _AP + 列番データ : _u;
for (const {pattern, url} of _TIR) {
if (new RegExp(pattern).test(列番データ)) return url;
}
}
};
`;
const normal_train_name = `
@@ -1027,107 +560,15 @@ export const injectJavascriptData = ({
if(trainDataList.find(e => e.train_id === 列番データ) !== undefined){
const data = trainDataList.find(e => e.train_id === 列番データ);
switch(data.type){
case "Normal":
trainTypeColor = "black";
isWanman = false;
trainType = "普通";
break;
case "OneMan":
trainTypeColor = "black";
isWanman = true;
trainType = "普通";
break;
case "Rapid":
trainTypeColor = "rgba(0, 140, 255, 1)";
isWanman = false;
trainType = "快速";
break;
case "OneManRapid":
trainTypeColor = "rgba(0, 140, 255, 1)";
isWanman = true;
trainType = "快速";
break;
case "LTDEXP":
trainTypeColor = "red";
isWanman = false;
trainType = "特急";
break;
case "NightLTDEXP":
trainTypeColor = "#d300b0ff";
isWanman = false;
trainType = "寝台特急";
break;
case "SPCL":
case "SPCL_Normal":
trainTypeColor = "#008d07ff";
isWanman = false;
trainType = "臨時";
break;
case "SPCL_Rapid":
trainTypeColor = "rgba(0, 81, 255, 1)";
isWanman = false;
trainType = "臨時快速";
break;
case "SPCL_EXP":
trainTypeColor = "#a52e2eff";
isWanman = false;
trainType = "臨時特急";
break;
case "Party":
trainTypeColor = "#ff7300ff";
isWanman = false;
trainType = "団体臨時";
break;
case "Freight":
trainTypeColor = "#00869ecc";
isWanman = false;
trainType = "貨物";
break;
case "Forwarding":
trainTypeColor = "#727272cc";
isWanman = false;
trainType = "回送";
break;
case "Trial":
trainTypeColor = "#727272cc";
isWanman = false;
trainType = "試運転";
break;
case "Construction":
trainTypeColor = "#727272cc";
isWanman = false;
trainType = "工事";
break;
case "FreightForwarding":
trainTypeColor = "#727272cc";
isWanman = false;
trainType = "単機回送";
break;
default:
break;
const _tCfg = TRAIN_TYPE_CFG[data.type];
if (_tCfg) {
trainTypeColor = _tCfg.typeColor;
isWanman = _tCfg.isWanman;
trainType = _tCfg.label;
}
isEdit = data.priority == 400;
isSeason = data.priority == 300;
operationList
.sort((a,b)=>sortOperationalList(a,b,data.train_id))
.forEach(e => {
if (e.train_ids?.length > 0) {
const trainIds = e.train_ids.map((x) => x.split(",")[0]);
if (trainIds.includes(data.train_id.toString())) {
//returnData.push(e);
isEdit = true;
}
} else if (e.related_train_ids?.length > 0) {
const trainIds = e.related_train_ids.map(
(x) => x.split(",")[0]
);
if (trainIds.includes(data.train_id.toString())) {
//returnData.push(e);
isEdit = true;
}
}
});
if (getOperationsByTrainId(data.train_id).length > 0) isEdit = true;
if(data.train_name != ""){
trainName = data.train_name;
if(data.train_num_distance != ""){
@@ -1266,73 +707,9 @@ const setNewTrainItem = (element,hasProblem,type)=>{
var 列番データ = element.getAttribute('offclick').split('"')[1];
if(trainDataList.find(e => e.train_id === 列番データ) !== undefined){
const data = trainDataList.find(e => e.train_id === 列番データ);
switch (data.type) {
case "Normal":
element.style.borderColor = "black";
element.style.backgroundColor = '#ffffffcc';
break;
case "OneMan":
element.style.borderColor = "black";
element.style.backgroundColor = '#ffffffcc';
break;
case "Rapid":
element.style.borderColor = "rgba(0, 140, 255, 1)";
element.style.backgroundColor = '#ffffffcc';
break;
case "OneManRapid":
element.style.borderColor = "rgba(0, 140, 255, 1)";
element.style.backgroundColor = '#ffffffcc';
break;
case "LTDEXP":
element.style.borderColor = "red";
element.style.backgroundColor = '#ffffffcc';
break;
case "NightLTDEXP":
element.style.borderColor = "#d300b0ff";
element.style.backgroundColor = '#ffffffcc';
break;
case "SPCL":
case "SPCL_Normal":
element.style.borderColor = "#008d07ff";
element.style.backgroundColor = '#ffffffcc';
break;
case "SPCL_Rapid":
element.style.borderColor = "#0051ffff";
element.style.backgroundColor = '#ffffffcc';
break;
case "SPCL_EXP":
element.style.borderColor = "#a52e2eff";
element.style.backgroundColor = '#ffffffcc';
break;
case "Party":
element.style.borderColor = "#ff7300ff";
element.style.backgroundColor = '#ffd0a9ff';
break;
case "Freight":
element.style.borderColor = "#00869ecc";
element.style.backgroundColor = '#c7c7c7cc';
break;
case "Forwarding":
element.style.borderColor = "#727272cc";
element.style.backgroundColor = '#c7c7c7cc';
break;
case "Trial":
element.style.borderColor = "#727272cc";
element.style.backgroundColor = '#c7c7c7cc';
break;
case "Construction":
element.style.borderColor = "#727272cc";
element.style.backgroundColor = '#c7c7c7cc';
break;
case "FreightForwarding":
element.style.borderColor = "#727272cc";
element.style.backgroundColor = '#c7c7c7cc';
break;
default:
element.style.borderColor = 'black';
element.style.backgroundColor = '#ffffffcc';
break;
}
const _bc = TRAIN_TYPE_CFG[data.type];
element.style.borderColor = _bc ? _bc.borderColor : 'black';
element.style.backgroundColor = _bc ? _bc.bgColor : '#ffffffcc';
}else{
if(element.getAttribute('offclick').includes("express")){
element.style.borderColor = '#ff0000ff';
@@ -1738,59 +1115,7 @@ textInsert.observe(document.getElementById('disp'), {
}
});
} catch(e) { /* 既にnon-configurableで定義済みの場合は無視 */ }
const StationData = [
{"StationName":"高松","StationNumber":"Y00","Feature":'{"Midori":{"style":"normal"},"IC":true}'},
{"StationName":"香西","StationNumber":"Y01","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"鬼無","StationNumber":"Y02","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"端岡","StationNumber":"Y03","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"国分","StationNumber":"Y04","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"讃岐府中","StationNumber":"Y05","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"鴨川","StationNumber":"Y06","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"八十場","StationNumber":"Y07","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"坂出","StationNumber":"Y08","Feature":'{"Midori":{"style":"normal"},"IC":true}'},
{"StationName":"宇多津","StationNumber":"Y09","Feature":'{"Midori":{"style":"normal"},"IC":true}'},
{"StationName":"丸亀","StationNumber":"Y10","Feature":'{"Midori":{"style":"normal"},"IC":true}'},
{"StationName":"讃岐塩屋","StationNumber":"Y11","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"多度津","StationNumber":"Y12","Feature":'{"Midori":{"style":"normal"},"IC":true}'},
{"StationName":"詫間","StationNumber":"Y14","Feature":'{"Midori":{"style":"plus"},"IC":true}'},
{"StationName":"観音寺","StationNumber":"Y19","Feature":'{"Midori":{"style":"normal"},"IC":true}'},
{"StationName":"川之江","StationNumber":"Y22","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"伊予三島","StationNumber":"Y23","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"新居浜","StationNumber":"Y29","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"伊予西条","StationNumber":"Y31","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"壬生川","StationNumber":"Y36","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"今治","StationNumber":"Y40","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"伊予北条","StationNumber":"Y48","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"松山","StationNumber":"Y55","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"内子","StationNumber":"U10","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"伊予大洲","StationNumber":"U14","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"伊予大洲","StationNumber":"S18","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"八幡浜","StationNumber":"U18","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"宇和島","StationNumber":"U28","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"多度津","StationNumber":"D12","Feature":'{"Midori":{"style":"normal"},"IC":true}'},
{"StationName":"善通寺","StationNumber":"D14","Feature":'{"Midori":{"style":"plus"},"IC":true}'},
{"StationName":"琴平","StationNumber":"D15","Feature":'{"Midori":{"style":"plus"},"IC":true}'},
{"StationName":"阿波池田","StationNumber":"D22","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"土佐山田","StationNumber":"D37","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"後免","StationNumber":"D40","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"高知","StationNumber":"D45","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"高知","StationNumber":"K00","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"朝倉","StationNumber":"K05","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"須崎","StationNumber":"K19","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"窪川","StationNumber":"K26","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"高松","StationNumber":"T28","Feature":'{"Midori":{"style":"normal"},"IC":true}'},
{"StationName":"栗林公園北口","StationNumber":"T26","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"栗林","StationNumber":"T25","Feature":'{"Midori":{"style":"plus"},"IC":true}'},
{"StationName":"屋島","StationNumber":"T24","Feature":'{"Midori":{"style":"none"},"IC":true}'},
{"StationName":"志度","StationNumber":"T19","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"三本松","StationNumber":"T12","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"徳島","StationNumber":"T00","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"鳴門","StationNumber":"N10","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"阿南","StationNumber":"","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"牟岐","StationNumber":"","Feature":'{"Midori":{"style":"normal"},"IC":false}'},
{"StationName":"鴨島","StationNumber":"B09","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
{"StationName":"穴吹","StationNumber":"B16","Feature":'{"Midori":{"style":"plus"},"IC":false}'},
];
const StationData = ${JSON.stringify(STATION_DATA)};
const setStationMenuDialog = new MutationObserver( (mutations) => {
const data =[];
document.querySelectorAll('#disp div div').forEach(d=>d.id.indexOf("st")!= -1 && data.push(d));