I made a bookmarklet for people in my school. Here is the code: document.body.contentEditable=true; there is also another bookmarklet to turn it off: document.body.contentEditable=false; These worked, but I wanted to try to make them into one bookmarklet. I tried this and failed. Here is the code: if (document.body.contentEditable == true) { document.contentEditable = false; } else { document.body.contentEditable = true; } I have no clue why it does not work. Someone please help.