This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables | |
let daysNumber = await loadTimeLeft() | |
let widget = await createWidget(daysNumber) | |
// Check if the script is running in | |
// a widget. If not, show a preview of | |
// the widget to easier debug it. | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} | |
// Tell the system to show the widget. |