A Useless (or not) Javascript Hack

June 12th, 2007 Da Vinci

Since I haven’t posted for over a month, I figured I could at least share this useless Javascript hack. Actually it may have some use but the ethics may be questionable… Anyway, it’s quite fun! On any Web page, enter the following in your browser’s address bar and hit enter. You can then delete and edit the Web page contents.

javascript: document.body.contentEditable = "true"; document.designMode= "on"; void 0
Google hack using Javascript
For example, I went to Google and did a search for the “best blog ever”. Needless to say Da Vinci Planet wasn’t number 1 (or 2, or 3…), but then after pasting the text above into the address bar I was able to edit the Web page and voilà I’m number 1!


6 Responses to “A Useless (or not) Javascript Hack”

  1. Matt Says:

    This post is really interesting (or not).

    :)

  2. Simon Says:

    Any way to insert pics into a hacked page?
    Changing text is nice but changing pics would be better!

  3. Slim Says:

    Here’s a way to change all the images on the page (all in one-line).

    javascript:var d=document;d.body.contentEditable=”true”;d.designMode=”on”;for(i=0;i

  4. Slim Says:

    Lost my post.. hope you see this line: Add this before the end of the void 0

    for(i=0; i

  5. Slim Says:

    too bad can’t post code.. the trick is to use document.images and loop the index and affect the src attribute to force an image

  6. cool Says:

    anyway to save this?

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>