Last active
January 12, 2026 16:11
-
-
Save Blumed/52683d22fd996b16e5a02c9e68f990d5 to your computer and use it in GitHub Desktop.
Bookmarklet for toggling document designMode for content updates on any page
This file contains hidden or 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
| const bookmarklet = { name: "bookmarklet__toggle-design-mode?", version: "1.0.05" }; | |
| try { | |
| if(document.designMode === 'off') { | |
| document.designMode = 'on'; | |
| console.log(`${bookmarklet.name}: ${bookmarklet.version} 'ON'`); | |
| } else { | |
| document.designMode = 'off'; | |
| console.log(`${bookmarklet.name}: ${bookmarklet.version} 'OFF'`); | |
| } | |
| } catch (error){ | |
| console.log(`${bookmarklet.name} : ${bookmarklet.version} : ${error}`); | |
| } | |
| // Paste the one line below into your bookmark url field for this code to work | |
| javascript:(function(){const bookmarklet={name:"bookmarklet__toggle-design-mode?",version:"1.0.05"};try{"off"===document.designMode?(document.designMode="on",console.log(`${bookmarklet.name}: ${bookmarklet.version} 'ON'`)):(document.designMode="off",console.log(`${bookmarklet.name}: ${bookmarklet.version} 'OFF'`))}catch(o){console.log(`${bookmarklet.name} : ${bookmarklet.version} : ${o}`)}}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment