Skip to content

supportClipboard

Clipboard write that also works off a non-secure origin.

navigator.clipboard only exists in a secure context (HTTPS / localhost). Over plain HTTP - a LAN IP, a ZeroTier address, a port-forwarded dev host - it is undefined, so a copy button wired straight to it silently does nothing. copyText falls back to a hidden <textarea> + document.execCommand("copy"), which is deprecated but still the only thing that works there.