Skip to content

Instantly share code, notes, and snippets.

SimonBoer / spotify-player-widget.js
Last active January 16, 2021 11:59
A Scriptable iOS widget that shows what‘s playing on Spotify
View spotify-player-widget.js
//Source: Spotify Web API
let spotifyCredentials
if (!config.runsInWidget) {
switch (config.widgetFamily) {
case 'small': await widget.presentSmall(); break;
case 'medium': await widget.presentMedium(); break;
case 'large': await widget.presentLarge(); break;
SimonBoer / Corona Upadate Germany Widget.js
Last active April 22, 2021 17:34
iOS Widget, das ein tägliches Corona Update innerhalb Deutschlands anzeigt (für die
View Corona Upadate Germany Widget.js
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
// Location sources
async function getLocation() {
try {
if (args.widgetParameter) {
const fixedCoordinates = args.widgetParameter.split(",").map(parseFloat);
return { latitude: fixedCoordinates[0], longitude: fixedCoordinates[1] };