Skip to content

Instantly share code, notes, and snippets.

View ParoTheParrot's full-sized avatar
🤠

Paro The Parrot ParoTheParrot

🤠
View GitHub Profile
@ParoTheParrot
ParoTheParrot / incidence.js
Last active August 10, 2023 07:25 — forked from kevinkub/incidence.js
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪 #corona #scriptabley
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
const apiUrl = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=GEN,cases7_per_100k&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
const apiUrlStates = 'https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/Coronaf%E4lle_in_den_Bundesl%E4ndern/FeatureServer/0/query?where=1%3D1&outFields=cases7_bl_per_100k&returnGeometry=false&outSR=4326&f=json'
const widget = await createWidget()
if (!config.runsInWidget) {
await widget.presentSmall()
}
Script.setWidget(widget)
Script.complete()
@ParoTheParrot
ParoTheParrot / tw_StyleSheet_tabs
Last active October 27, 2020 15:18
StyweSheet #twc
.viewer .tabSelected,
.viewer .tabContents { background-color: [[ColorPalette::Background]]; } /* use inherit? returns "border-bottom" to tabSelected (actually it is __) for some reason */
.viewer .tabSelected:hover { color: inherit; } /* inconsistent: either switch pointer back to ~normal and make sure it doesn't do a thing or ... */
.tabset { padding-left: 0; }
.tab {
display: inline-block;
white-space: pre-wrap;
position: relative;
bottom: -1px;
@ParoTheParrot
ParoTheParrot / TWC_MessageFadeOut
Last active October 27, 2020 15:03
TWC_Message FadeOut #twc
config.options.txtFadeTimer = 5000; // 5 seconds
var displayMessageFADEOUT=displayMessage;
displayMessage=function(text,linkText)
{
displayMessageFADEOUT.apply(this, arguments);
ti=config.options.txtFadeTimer;
if(ti>0)setTimeout(clearMessage,ti);
}