- How to Create a Javascript Bookmarklet Easily 🖳 | Scrapers〘N〙Bots Blog

- How to Create a Javascript Bookmarklet Easily 🖳 | Scrapers〘N〙Bots Blog

How to Create a Javascript Bookmarklet


Creating a Javascript bookmarklet is rather easy. If you don't know Javascript at all it won't be easy, but the difference between regular Javascript code and a bookmarklet is you don't have to own the website you are going to run the Javascript bookmarklet code on.

This is fantastic and exciting news because it means through the use of bookmarklets, we can vastly modify and turbocharge how any website or web page behaves and operates. In a sense, a Javascript bookmarklet is hacking the web with Javascript.

The Difference Between Javascript and a Javascript Bookmarklet

  1. The Javascript code for a bookmarklet has to start with javascript:. This is because a bookmarklet is being execute through the web browser so by putting javascript: at the beginning we are telling the web browser 'the following is Javascript code'.
  2. The Javascript bookmarklet code should be wrapped with the following code
    javascript:(function() {// your script here.}());.

No comments:

Post a Comment