endar() {
  layout.clear();
  layout = makeLayout();
  layout.forgetLazyState();
  layout.render();

  let nextChange = Math.min(
    findNextEvent().startEvent - DateProvider.now() + 5000,
    nextEndingEvent - DateProvider.now() + 5000
  );
  setTimeout(updateCalendar, nextChange);
  console.log("updated events");
}

updateCalendar();

Bangle.setUI("clock");
			`,
					},
				],
			});
		}

		document
			.querySelector("button[type=submit]")
			.addEventListener("click", onload, false);

		document.queryS