Skip to content

Instantly share code, notes, and snippets.

@GeoffreyDMartin
Created October 7, 2020 15:49
Show Gist options
  • Save GeoffreyDMartin/e66fbdf97a8c15901c11d43e566c38b3 to your computer and use it in GitHub Desktop.
Save GeoffreyDMartin/e66fbdf97a8c15901c11d43e566c38b3 to your computer and use it in GitHub Desktop.
if (config.runsInWidget) {
let widget = createWidget()
Script.setWidget(widget)
Script.complete()
} else {
}
function createWidget() {
let w = new ListWidget()
let date1 = w.addDate(new Date())
date1.applyTimerStyle()
date1.centerAlignText()
let date2 = w.addDate(new Date())
date2.centerAlignText()
let stack = w.addStack()
stack.addSpacer()
let date3 = stack.addDate(new Date())
date3.applyTimerStyle()
date3.centerAlignText()
stack.addSpacer()
return w
}
Script.complete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment