13 lines
519 B
JavaScript
13 lines
519 B
JavaScript
const fs = require('fs');
|
|
const data = fs.readFileSync('c:/GitHub/FW/Trainings/WBT_ErkW_2_Aufbau_und_Ueberblick_Bedienoberflaeche/html5/data/js/5eDZVsflCng.js', 'utf8');
|
|
|
|
const match = data.match(/window\.globalProvideData\('slide',\s*"(.*)"\);/s);
|
|
if (match) {
|
|
let jsonStr = match[1];
|
|
jsonStr = jsonStr.replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
|
const obj = JSON.parse(jsonStr);
|
|
|
|
fs.writeFileSync('c:/GitHub/FW/dump.json', JSON.stringify(obj, null, 2));
|
|
console.log('Dumped to dump.json');
|
|
}
|