Skip to content

Instantly share code, notes, and snippets.

@Blumed
Last active January 12, 2026 16:11
Show Gist options
  • Select an option

  • Save Blumed/52683d22fd996b16e5a02c9e68f990d5 to your computer and use it in GitHub Desktop.

Select an option

Save Blumed/52683d22fd996b16e5a02c9e68f990d5 to your computer and use it in GitHub Desktop.
Bookmarklet for toggling document designMode for content updates on any page
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