Skip to content

Instantly share code, notes, and snippets.

@webOSpinn
webOSpinn / StockWidget.js
Last active February 17, 2021 23:31 — forked from saiteja09/StockWidget.js
Stock Widget for iOS using Scriptable
// 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.