Skip to content

Instantly share code, notes, and snippets.

View rflrkn's full-sized avatar

Rafael Arkenau rflrkn

View GitHub Profile
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: purple; icon-glyph: magic;
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
/**
* MEDIUMWIDGET SUPPORT - Set Widgetparemeter to: NAME,51.123,6.7373
*/
const outputFields = 'GEN,cases,cases_per_100k,cases7_per_100k,cases7_bl_per_100k,last_update,BL';
const apiUrl = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=${outputFields}&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
function bakeCookie(cname, cvalue, exdays){
const d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
let expires = "expires=" + d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function eatCookie(cname){
let name = cname + "=";
let decodedCookie = decodeURIComponent(document.cookie);
@rflrkn
rflrkn / ProtonDB Hide Steam Deck
Last active July 7, 2023 18:15
auto hides steam deck infos on ProtonDB
// ==UserScript==
// @name ProtonDB Hide Steam Deck
// @match https://www.protondb.com/*
// @require https://code.jquery.com/jquery-3.7.0.slim.min.js
// @version 1.0
// @author rflrkn.de
// @description auto hides steam deck infos on ProtonDB
// ==/UserScript==
let waitForEl = function(selector, callback) {