Skip to content

Instantly share code, notes, and snippets.

@malesfth
malesfth / widget_grafana.js
Created November 1, 2020 15:57
iOS Scriptable Widget for Grafana
// Parameters:
// {"url":"http://grafana","bearer":"123abc"}
// Optional key in parameters: "theme": system|light|dark|grafana
let grafanaURL = "" //set the URL here for debug
let grafanaBearer = "" // set the API-key here for debug
let wTheme = "system" // set the theme for debug
if (config.runsInWidget) {
const widgetParams = (args.widgetParameter != null ? JSON.parse(args.widgetParameter) : null)
@malesfth
malesfth / widget_portainer.js
Last active October 31, 2023 15:20
iOS Scriptable Widget for Portainer (Docker)
// Parameters:
// {"url":"https://portainer:9000","user":"username","pass":"secret"}
// Optional key in parameters: "endpoint": 1|2|...
// Optional key in parameters: "theme": system|light|dark|docker
// Optional key in parameters: "name": "Portainer|Docker"
let portainerUser = "" // set the username here for debug
let portainerPass = "" // set the password here for debug
let portainerURL = "" //set the URL here for debug
let portainerEndpoint = "1" //set the endpoint id for debug
@malesfth
malesfth / widget_pi-hole.js
Last active December 13, 2023 01:56
iOS Scriptable Widget for Pi-hole
// Parameters:
// {"url":"https://pihole","token": "x"}
// Optional key in parameters: "theme": system|light|dark
let piholeURL = "" // set the URL here for debug
let apiToken = "" // set the api token here for debug
let wTheme = "" // set the theme for debug
if (config.runsInWidget) {
const widgetParams = (args.widgetParameter != null ? JSON.parse(args.widgetParameter) : null)