Skip to content

Instantly share code, notes, and snippets.

@jscmidt
jscmidt / openWB-Widget
Last active September 6, 2023 18:22
iOS-widget for openWB using the Scriptable-app.
iOS-widget for openWB using the Scriptable-app.
@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)
@JoeGit42
JoeGit42 / forked-telekom.js
Last active January 9, 2022 23:02 — forked from LupusArgentum/telekom-widget-link.md
iOS-Widget für Datenverbrauch im Telekom-Netz (Forked from Sillium/telekom.js)
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: pink; icon-glyph: signal;
// creator: https://github.com/Sillium | changed by https://github.com/LupusArgentum | change again by me, https://github.com/JoeGit42
const apiUrl = "https://pass.telekom.de/api/service/generic/v1/status"
const logoIsWanted = (args.widgetParameter == "logo")
const colorTimeToSignalEndOfMonth = false
const showIndicationIfAPIOffline = false
const showAvailableVolume = true
@LupusArgentum
LupusArgentum / telekom-widget-link.md
Last active November 7, 2020 15:04 — forked from Sillium/telekom.js
iOS-Widget für Datenverbrauch im Telekom-Netz (Forked from Sillium/telekom.js)
@kevinkub
kevinkub / incidence.js
Last active June 27, 2023 12:53
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
class IncidenceWidget {
constructor() {
this.previousDaysToShow = 31;
this.apiUrlDistricts = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=RS,GEN,cases7_bl_per_100k,cases7_per_100k,BL&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
this.apiUrlDistrictsHistory = (districtId) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/ArcGIS/rest/services/Covid19_hubv/FeatureServer/0/query?where=IdLandkreis%20%3D%20%27${districtId}%27%20AND%20Meldedatum%20%3E%3D%20TIMESTAMP%20%27${this.getDateString(-this.previousDaysToShow)}%2000%3A00%3A00%27%20AND%20Meldedatum%20%3C%3D%20TIMESTAMP%20%27${this.getDateString(1)}%2000%3A00%3A00%27&outFields=Landkreis,Meldedatum,AnzahlFall&outSR=4326&f=json`
this.stateToAbbr = {