For ease of maintainability this project has moved from this gist to its own repository. You can go and visit it there.
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
const url = "https://xkcd.com/info.0.json" | |
const req = new Request(url) | |
const { img: imgUrl } = await req.loadJSON() | |
const imgReq = await new Request(imgUrl) | |
const img = await imgReq.loadImage() | |
// for development, displays the widget if run | |
const debug = false; |