Alter all websites in the world - gHacks Tech News

Alter all websites in the world

The following is a nice trick that I learned on a webmaster forum. I thought it would be nice to describe it to you as well because you can have some fun with it.

It allows you to manipulate all elements of a website directly in the browser that you are using. You could for instance create number one positions on Google, add your own products to Amazon or write a cover story on CNN.

The changes are only temporary but you can make a screenshot and send it to your friends to have some fun when they are trying to figure out what the heck is going on.

alter all websites

This is also a reminder that anything that is shown on screenshots can be easily faked. This is especially true for website revenue screenshots for instance which you often get as proof when you are about to buy a website, or visit "earn money" blogs and sites around the websites.

All you need to do is load a website and load the following code in the address bar:

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

Make sure you paste everything in one line and hit enter afterwards. Once that is done you can easily edit elements on the website. I created a short video that shows how I edited the Microsoft homepage.

Update: Please note that most web browsers nowadays prevent the pasting of JavaScript into the address bar, or to be more precise, the execution of pasted JavaScript, to prevent social engineering attacks.

JavaScript code needs to be executed from the JavaScript console in those browsers. Google Chrome makes one available for instance when you press Ctrl-Shift-J. Just paste the code into the console, hit enter, and start editing the page you are on like you normally would. Other browsers have JavaScript consoles as well so that is all that changes in this regard.

Firefox users needs to press Ctrl-Shift-K to bring up the console. They can then paste the code into the console to execute it. If it does not work, check for reported errors which should appear right after you hit the enter key.

Internet Explorer users can tap on F12 to bring up the Developer Tools and switch to Console, or use Ctrl-2 to go there.

Note: You may receive an "undefined" status message when you execute the code in the browser. This does not mean that it is not working, and you should be able to edit the web page right away afterwards regardless of the code.

Summary
Alter all websites in the world
Article Name
Alter all websites in the world
Description
The article reveals code that you can execute in any web browser to edit any element on any website that you visit in the web browser.
Author
Publisher
Ghacks Technology News
Logo




  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. Reeez said on December 29, 2007 at 8:50 pm
      Reply

      how cool is that? … but somehow senseless ^^

    2. rruben said on December 30, 2007 at 1:11 am
      Reply

      cool trick, I will try that out to fool some guys whaha

    3. kennedy said on February 19, 2011 at 3:22 am
      Reply

      Cool but as soon as you refresh the page the code goes away which is usless unless you are creating fake screen shots. Unless you could find the script of that website and paste the code there, or make the edited content a URL/HTML adress and redirect the web adress there or if you download the website and find the editor content or access it from the local wifi network from which it runs or upload a worm to the site with that javascript inside it which would make it publicly avalible to edit otherwise it is only temporary.

      Sorry Dude

    4. Dwight Stegall said on March 25, 2015 at 10:55 am
      Reply

      You can also remove images, move them around with drag and drop or even add images from your hard drive or the web. Great for pranking friends if you don’t mind never being spoken to or trusted again. :) Many years ago Opera had a similar feature built into it. This method works in all browsers that support JavaScript. I call it “Web Designers’ Nightmare”.

    Leave a Reply