()
| 13 | Script.complete() |
| 14 | |
| 15 | async function loadCurrentChannel() { |
| 16 | let url = schema + "://" + openWebIfUser + ":" + openWebIfPassword + "@" + openWebIfUrl + "/getcurrent" |
| 17 | let req = new Request(url) |
| 18 | req.allowInsecureRequest = true |
| 19 | try { |
| 20 | let json = await req.loadJSON() |
| 21 | return json |
| 22 | } catch(e) { |
| 23 | return 'Keine Verbindung zum Server' |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | function getTime(timestamp) { |
| 28 | let ts = new Date(timestamp * 1000) |