Skip to content

Instantly share code, notes, and snippets.

@webOSpinn
webOSpinn / StockWidget.js
Last active Feb 17, 2021 — forked from saiteja09/StockWidget.js
Stock Widget for iOS using Scriptable
View StockWidget.js
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: book; share-sheet-inputs: plain-text;
// Stock Ticker Widget
let locale = Device.locale().replace("_","-");
let stocksInfo = await getStockData()
let widget = await createWidget()
if (config.runsInWidget) {
// The script runs inside a widget, so we pass our instance of ListWidget to be shown inside the widget on the Home Screen.