Skip to content

Instantly share code, notes, and snippets.

@29SimonB
29SimonB / spotify-player-widget.js
Last active January 16, 2021 11:59
A Scriptable iOS widget that shows what‘s playing on Spotify
//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;
@29SimonB
29SimonB / 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 scriptable.app)
// 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] };