How To Execute JavaScript In Google Chrome

From last few versions of Google Chrome updates, Google doesn’t allow users to copy any JavaScript code from anywhere and run it on a webpage by directly pasting it to address bar. They did this because it was causing security issue, as many people who don’t know much about such things were getting trapped in scam, malware and other such things.

It was being used for good purpose also, as people also use it to unlock all levels of Angry Birds game, select all your friends on Facebook with a single-click and many more ways. So if you are one of them who make use of it for good purpose then good purpose then you don’t have to worry there are other ways also.

JavaScript Code

Let me tell you how, first open your Chrome, copy the JavaScript code which you want to use, now open the page where you want to make it work, then follow anyone of these:

Using Address Bar:

  1. Past that JavaScript code in address bar
  2. Now press Home key from your keyboard or go to starting point of that code in address bar
  3. Type JavaScript: (first type “javascript”, then colon “:”, without any space), now it will get converted into a link
  4. And then press Enter, now that code will be applied (start functioning) on that page

Using Bookmarklet:

You can also create a bookmarklet, to create

  1. Press Ctrl+D (from your keyboard)
  2. Then a popup will open near address bar, click on Edit button
  3. Now past the code at the place of URL (make sure it is starting with JavaScript: else it will not work) and give whatever name you would like to give
  4. After that click on Save button, now whenever you will click on that bookmark and it will get applied on that page (on the page which was opened when you clicked on it)

Using JavaScript Console:

  1. Just press Ctrl+Shift+J, now JavaScript Console will open
  2. Past your JavaScript code their
  3. Then press Enter and it start functioning