{"always_run_in_app":false,"icon":{"color":"deep-blue","glyph":"newspaper"},"name":"KI-Briefing","script":"// KI-Briefing widget for Scriptable. Installed once from https://newsletter.leander-endres.de/widget/\n// Loads the current widget code from the site, keeps a copy for offline use and runs it.\nconst CODE = \"https://newsletter.leander-endres.de/widget/ki-briefing.js\";\nconst fm = FileManager.local();\nconst path = fm.joinPath(fm.documentsDirectory(), \"ki-briefing-widget.js\");\nlet code = null;\ntry {\n  const r = new Request(CODE);\n  r.timeoutInterval = 10;\n  const text = await r.loadString();\n  if (r.response.statusCode === 200 && text.startsWith(\"// KIB_WIDGET\")) { code = text; fm.writeString(path, text); }\n} catch (e) {}\nif (!code && fm.fileExists(path)) code = fm.readString(path);\nif (!code) throw new Error(\"Widget-Code nicht erreichbar. Bitte mit Netz noch einmal starten.\");\nawait new (Object.getPrototypeOf(async function () {}).constructor)(code)();\n","share_sheet_inputs":[]}