Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Scriptable to show how long its taking for Germany to get herd immunity from Corona
const apiUrl = '';
let widget = await createWidget();
async function createWidget(itens){
const list = new ListWidget();
let header, label;
const data = await getCountdown();
header = list.addText("🦠 Corona Herdenimmunität");
header.font = Font.mediumSystemFont(14);
label = list.addText("in "+data.numberOfDays+" Tagen am """);
label.font = Font.mediumSystemFont(16);
website = list.addText("");
website.font = Font.mediumSystemFont(9);
async function getCountdown(){
let data = await new Request(apiUrl).loadJSON();
return data;
return list;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment