Hacking Editing Websites

So today I remembered fun and easy little trick to edit any websites content. Of course it is not permanent and only visible by you, but its a fun way to experiment and maybe trick friends sitting next to you.

As example I will use facebook.com

The original site at the time of posting would look like so:

So now the fun part. To edit the content of the site that you are displaying all you do is paste this peace of code into the address bar of your browser and hit enter.

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

Make sure that before you hit enter the line has JavaScript: at the beginning as most browsers cut it off if you use the copy paste for security reasons. In that case just type it manually with your keyboard instead of pasting it.

You will be able to edit the site contents like I have done in the example above. It becomes as easy as using a word document. Just highlight the text you want to change and start typing.

To stop the editing execute the following code:

javascript:document.body.contentEditable = 'false'; document.designMode='off'; void 0

Leave a Reply

Your email address will not be published. Required fields are marked *