Skip to content

Instantly share code, notes, and snippets.

@viclafouch
Last active January 25, 2024 14:21
Show Gist options
  • Save viclafouch/c6445aa2f0cf23f990587ad3061fd380 to your computer and use it in GitHub Desktop.
Save viclafouch/c6445aa2f0cf23f990587ad3061fd380 to your computer and use it in GitHub Desktop.
Edit your website in live by using `document.designMode` and killing links
// Disable anchor links
window.addEventListener('click', event => event.preventDefault(), false)
// Disable click eventlisteners
window.addEventListener("click", event => event.stopPropagation(), true)
// Enable design mode
document.designMode = "on"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment