MCPcopy Index your code
hub / github.com/Necriso/ScriptableWidgets / loadCurrentChannel

Function loadCurrentChannel

openWebIf.js:15–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13Script.complete()
14
15async 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
27function getTime(timestamp) {
28 let ts = new Date(timestamp * 1000)

Callers 1

openWebIf.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected