This file contains hidden or 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
// widget created by @marco79 (Twitter) user/marco79 (RoutineHub) u/marco79 (Reddit) | |
// insert your Spotify client id and secret here | |
const clientId = "xxxxxx" | |
const clientSecret = "xxxxxx" | |
const spotifyPlaylistName = "Retrowelle Playlist" | |
// insert your IFTTT key and webhook url | |
const iftttUrl = "https://maker.ifttt.com/trigger/add_track_to_spotify/with/key/" | |
const iftttKey = "xxxxxx" |
This file contains hidden or 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
let spotifyCredentials | |
let widget = await createWidget() | |
Script.setWidget(widget) | |
Script.complete() | |
async function createWidget() { | |
let widget = new ListWidget() | |
let spotifyIcon = await getImage("spotify-icon.png") | |
widget.backgroundColor = new Color("1e2040") |
This file contains hidden or 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
// Este es un widget de Scriptable para iOS que muestra una mascota random de Japón. | |
// Gracias a MorettiAmye por la data! <3 https://github.com/morettiamye/yuru-chara | |
// This is a Scriptable Widget for iOS that shows a random mascot of Japan. | |
// Thank you MorettiAmye for the data! <3 https://github.com/morettiamye/yuru-chara | |
const mascotNumber = () => { | |
return Math.floor(Math.random() * (175 - 1)) + 1; | |
}; |
This file contains hidden or 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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: cyan; icon-glyph: clock; | |
let countries = [ | |
{name: "🇺🇸", offset: -1, bgColor: new Color("BF0D3E",1)}, | |
{name: "🇧🇷", offset: 0, bgColor: new Color("009639",1)}, | |
{name: "🇮🇪", offset: 4, bgColor: new Color("FF8200",1)} | |
] | |
let widget = new ListWidget() |
This file contains hidden or 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
// This script recreates Greg Joswiak's widget that counts down to the "Hi, Speed" Apple Event on October 13th, 2020. | |
// You can see Greg's widget in this tweet: | |
// https://twitter.com/gregjoz/status/1313519797879988225 | |
// | |
// You'll need this image for the background: | |
// https://i.imgur.com/t9Jr8kL.png | |
// | |
// I've stored the image at imgs/hispeed.png Scriptable's folder in iCloud Drive. | |
let widget = createWidget() |
This file contains hidden or 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 w = new ListWidget() | |
w.backgroundImage = await getBgImage() | |
const joke = w.addText(await getJoke()) | |
joke.textColor = Color.white() | |
joke.minimumScaleFactor=0.1; | |
joke.shadowOffset = new Point(2,2) | |
joke.shadowRadius = 2 | |
joke.centerAlignText() |
This file contains hidden or 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
"use strict"; | |
/** | |
* This widget is from <https://github.com/jasonsnell/PurpleAir-AQI-Scriptable-Widget> | |
* By Jason Snell, Rob Silverii, Adam Lickel, Alexander Ogilvie, and Brian Donovan. | |
* Based on code by Matt Silverlock. | |
*/ | |
const API_URL = "https://www.purpleair.com"; |
This file contains hidden or 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
/** | |
* S10 桌面小组件 | |
* Author : BlueSky | |
* Version : 2.0-201009 | |
* API : https://tiyu.baidu.com/match/S10 | |
* Gist : https://gist.github.com/BlueSky-07/70bcfedc4e5fe7fcf1b06db48124fffe | |
* Readme : https://sspai.com/post/62980 | |
*/ | |
/** |
This file contains hidden or 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://api.coronavirus.data.gov.uk/v1/data?filters=areaName=United%2520Kingdom;areaType=overview&latestBy=newCasesByPublishDate&structure=%7B%22date%22:%22date%22,%22value%22:%22newCasesByPublishDate%22%7D` | |
const req = new Request(url) | |
const res = await req.loadJSON() | |
if (config.runsInWidget) { | |
let widget = createWidget(res.data[0].value, new Date(res.data[0].date)) | |
Script.setWidget(widget) | |
Script.complete() | |
} |