Skip to content

Instantly share code, notes, and snippets.

View Krutsch's full-sized avatar
✝️
King of Kings

Fabian Krutsch

✝️
King of Kings
View GitHub Profile
@Krutsch
Krutsch / refreshPull.js
Last active March 18, 2025 07:34
iOS PWA Pull to Refresh
const standaloneIOS =
(navigator.standalone ||
window.matchMedia("(display-mode: standalone)").matches) &&
CSS.supports("-webkit-touch-callout", "none");
if (standaloneIOS) {
const classes = ["pointer-events-none", "opacity-20", "overflow-hidden"]; // optional setting classes
let loading = false;
document.addEventListener("scroll", (event) => {