- Scrape & analyse all 19 internal APIs of train.jr-shikoku.co.jp/sp.html using puppeteer + Chromium remote debugging - Save live-captured sample JSON for every API endpoint under lib/mockApi/mockData/ (station lists, lang, timetable, train positions, etc.) - Add lib/mockApi/webviewXhrInterceptor.ts – generates a JS snippet that overrides XMLHttpRequest inside the WebView before page scripts run; intercepts /g?arg1=train&arg2=train (and optionally all static APIs) returning mock data instead of the real server response - Add lib/mockApi/index.ts – convenience re-exports + MOCK_TRAIN_POSITIONS constant pre-populated with captured sample data - Extend InjectJavascriptOptions with optional mockApiConfig field - injectJavascriptData() prepends the interceptor JS when mockApiConfig is set - TrainMenuContext gains mockApiEnabled / setMockApiEnabled and mockTrainPositions / setMockTrainPositions state; consumers can enable mock mode and inject custom TrainEntry[] without reloading the app Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
74 lines
1.6 KiB
JSON
74 lines
1.6 KiB
JSON
[
|
|
{
|
|
"StartStationName": "坂出",
|
|
"EndStationName": "宇多津",
|
|
"LineName": "seto",
|
|
"Point": "Up",
|
|
"Half": "F-End",
|
|
"DispPos": "seto_0_児島"
|
|
},
|
|
{
|
|
"StartStationName": "多度津",
|
|
"EndStationName": "海岸寺",
|
|
"LineName": "dosan",
|
|
"Point": "Down",
|
|
"Half": "Start",
|
|
"DispPos": "dosan_0_多度津"
|
|
},
|
|
{
|
|
"StartStationName": "向井原",
|
|
"EndStationName": "伊予中山",
|
|
"LineName": "uwajima2",
|
|
"Point": "Up",
|
|
"Half": "Start",
|
|
"DispPos": "uwajima2_0_向井原"
|
|
},
|
|
{
|
|
"StartStationName": "新谷",
|
|
"EndStationName": "伊予大洲",
|
|
"LineName": "uwajima2",
|
|
"Point": "Up",
|
|
"Half": "End",
|
|
"DispPos": "uwajima2_3_伊予大洲"
|
|
},
|
|
{
|
|
"StartStationName": "箸蔵",
|
|
"EndStationName": "佃",
|
|
"LineName": "tokushima",
|
|
"Point": "Down",
|
|
"Half": "End",
|
|
"DispPos": "tokushima_16_佃"
|
|
},
|
|
{
|
|
"StartStationName": "吉成",
|
|
"EndStationName": "佐古",
|
|
"LineName": "tokushima",
|
|
"Point": "Up",
|
|
"Half": "End",
|
|
"DispPos": "tokushima_0_徳島"
|
|
},
|
|
{
|
|
"StartStationName": "佐古",
|
|
"EndStationName": "蔵本",
|
|
"LineName": "koutoku",
|
|
"Point": "Up",
|
|
"Half": "Start",
|
|
"DispPos": "koutoku_19_佐古"
|
|
},
|
|
{
|
|
"StartStationName": "辻",
|
|
"EndStationName": "佃",
|
|
"LineName": "dosan",
|
|
"Point": "Up",
|
|
"Half": "End",
|
|
"DispPos": "dosan_7_佃"
|
|
},
|
|
{
|
|
"StartStationName": "板東",
|
|
"EndStationName": "池谷",
|
|
"LineName": "naruto",
|
|
"Point": "Down",
|
|
"Half": "End",
|
|
"DispPos": "naruto_0_鳴門"
|
|
}
|
|
] |