Monday, 24 September 2018

executing a javascript from bookmark

pls follow the following steps to execute a script using the book mark.

Tested in chrome and also works in other browsers too.


Open Bookmarks : Add new bookmark

name : give any name "Test" 
url     :   javascript: (function () {
                                                 // your code for the page here
                                                  console.log("Test");
                                                 })();


now enable show bookmark bar in options , you will see a  "Test " with an icon in under the search bar. if you click that the script will run.

you can check if the scipt in running or not in the console.








No comments:

Post a Comment