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

  • Vincent

    Really cool πŸ˜€

    I used it to trick my brother into thinking his website was hacked.

  • Nice trick its easy it dosent really hack the site though πŸ˜€

  • Pingback: Facebook Mahabharatha « Doing Jalsa and Showing Jilpa()

  • Anjan

    Really cool trick dude..
    i used this trick to edit the existing page to make prototype of my portal..

  • sanjeev

    How do you change the pictures on the website though?

  • sanjeev

    Can we also change the pictures on a website?

  • Abhinav

    it’s really cooooooooooooooool

  • qwerty

    how do you save the changes

  • cnu

    @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.

  • cody

    Lol, i used this on my school grades site to trick my mom so i wouldent get grounded

  • lol cool

    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

  • Eclipse

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

  • robert

    how do i save it

  • me

    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….

  • Luke

    Nice! Fun to use. I love tricking people at computer class into thinking I hacked the schools website!

  • lol

    U cant edit pages with pics. Changingtext and deleting everything is all u can do

  • juan

    umm its a kool trick but it does save it i wish it did tho

  • aaron

    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?

  • 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 πŸ™‚

  • dh

    But this is not working. I tried it in chome/safari >> no response.
    In IE >> error on page.

  • Brijesh

    Nice Man

    Very Goooooood

  • balls

    how do u get the points for lckerz

  • Pingback: we can no spamz? - Page 3 - World Dominance()

  • TOBY

    i edited my google.co.uk so instead of UK next to it it said we have cookies and i tricked my whole class into thinking google had a virus

  • Jonny

    Thanks but how do you save it.

  • dog

    y is there smile face at bottom of page?????

  • syrish

    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

    Thanks

  • Mark

    @dog
    Why not? >.>

  • Andrew Harris

    About the pictures, they can be inserted but pictures already on the page cannot be removed.

  • Andrew Harris

    @ syrish
    To paste an image on a page you want to edit just find the image you want to paste then right-click and do “Copy” then go to the page you want to add the picture too and do “Paste”.

    hope that help, if you have anymore question you can email me at: [email protected]

  • trevor.smokes

    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.

    please.help.me.edit.page.content.without.being.on.server.

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

  • Java hacker

    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!!!

  • John Doc

    how do you save changes

  • connor

    haha i tricked my teacher into thinking i had hacked our school website =p REALY COOL TRICK

  • zexgempak

    just prees f5