'Javascript bookmarklet for toggling webpage editing on/off?

I once saw a JavaScript bookmarklet on the internet, but I lost it.

The bookmarklet does not specifically enable/disable the page editability, but it does toggle the editability, meaning that pressing the exact same bookmark turns editing on (enables) if it is currently off (disabled), and vice versa.

What was the bookmarklet script?



Solution 1:[1]

best way to turn it off easily would be to just create another bookmarklet, except change 'true' to 'false.'...or you could use this convinient toggleable bookmarklet

Drag this into bookmark bar

source: https://gist.github.com/jameswyse/b5b9f42bf38e7c09262cb37ea44ce626

Solution 2:[2]

Here is the code for a bookmarklet which toggles editing on and off:

javascript:if(document.body.contentEditable === 'true'){document.body.contentEditable = 'false';}else if (document.body.contentEditable === 'false'){document.body.contentEditable === 'true'}

Solution 3:[3]

Well I have the code, but it dosen't toggle of and on. If you want to turn it off just reload the page.

javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 i Penguin
Solution 2 yessir
Solution 3 SnipeHammer08