Javascript trick to edit the page displayed

Do you want to quickly edit the text of any webpage that you are browsing? Maybe you wanted to see how the site looks if you change some words. Here is a neat Javascript trick that you can use to edit the text part of the web page.

Do note that you can’t save the changed text onto the server or is this any means to hack a web server. If you refresh the page, all the changes you made will disappear. You can however save the resulting HTML if you goto File -> Save as.

Step 1: Drag thisΒ Edit/View bookmarklet into your bookmarks toolbar.

Step 2: Goto the web page which you want to edit and click on the bookmarklet – you will be put into the edit mode. Click the bookmarklet again and you will be put into the normal view mode.

Step 3: ?????

Step 4: Profit.

For those of you who like to know what it does beneath the scenes, it just sets two properties of the document to make it editable.

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

35 thoughts on “Javascript trick to edit the page displayed”

  1. @qwerty
    You can save the resulting page as html file on to your disk. Unfortunately you cannot save the changes onto the server (if that is what you asked). That is the point of javascript.

  2. lol i wish u could save these it would be so hilarious. i have a million things i would do with this if u could XD

  3. i went into CMD at my friends house and typed stuff really fast like:
    Net user
    Net Help
    and then went into IE and got onto his myspace and started changing stuff xD it was fny

  4. lol i used it on my school’s website and showed everyone i knew to make it look like we didnt have school for three weeks it was AWESOME……but then i got suspended….

  5. very lol. i kno this dickhead who used this to trick me into thinking he was getting messages from this really hot chick saying they were together.. .lol pretty sad eh?

  6. To edit pics, go to the webpage with the required pic. Paste the script in browser. Copy the pic. Paste in the page you were origially editing. Simple πŸ™‚

  7. Pingback: we can no spamz? - Page 3 - World Dominance
  8. i edited my so instead of UK next to it it said we have cookies and i tricked my whole class into thinking google had a virus

  9. Hi,
    Its awesome what you can do, but i am facing a problem… how to paste the image on the page you want to edit.

    Can anyone reply please asap.

    I need it urgently


  10. okay i know this isnt kool but how can you make the edited content saved onto the page itself . i know it might be a stupid question . but if it can be done i would like to know how.

    can i edit the page , and have the edited content saved onto the domain. thank you.

  11. In order to “save” it, you type this in javascript:document.body.contentEditable=’true’; document.designMode=’on’; void 0

    but really, all that happens is it changes YOUR INDIVIDAUL site, it doesn’t do anything for anyone else. Just you. But, if you have fire fox, it is possilbe to save it to your favorites, I think, so that would be a help, also, you still will be able to re-edit the site once you re insert the first code javascript:document.body.contentEditable=’true’; document.designMode=’on’; void 0

    the only diffrence is this: Javascript:document.body.contentEditable=’ true, {change this to false} ;document.designMode= ‘on’ {change this to off}; void 0{change this to the number ‘1’}. And there you have it:), enjoy!!!

Comments are closed.