Last active
May 20, 2022 14:27
-
-
Save oliveratgithub/006284221e65ff43c5799717df82c922 to your computer and use it in GitHub Desktop.
π On-page Website Content Editing: contentEditable browser bookmarklets to start/stop live-edit mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:document.body.contentEditable=true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:document.body.contentEditable=false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html, <title>Take notes</title><body contenteditable style="font:2rem/1.5 Helvetica,monospace;max-width:60rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;"><script>const beforeUnloadListener=(event)=>{event.preventDefault();return event.returnValue="Have you saved your notes?"};const check=document.querySelector("body");check.addEventListener("input",(event)=>{addEventListener("beforeunload",beforeUnloadListener,{capture:true})});</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment