function as google chrome bookmark function as google chrome bookmark google-chrome google-chrome

function as google chrome bookmark


You can do this using a bookmarklet. A bookmarklet is a bookmark with a URI starting with the pseudo-protocol javascript: followed by URI-encoded JavaScript code. When you trigger the bookmark, browser will run the code in the context of the current page. So you'd go to that page, then use that bookmarklet to fill in your standard information, and there you go.

For example, here's a bookmarklet that, when run, will look for an element with the id someElement on the page and, if found, assign "some value" to its value property:

javascript:(function(){var d=document,e=d.getElementById("someElement");e.value="some value";})();


This bookmarklet creator will come in handy to squish your JavaScript into one line: http://mrcoles.com/bookmarklet/


Here is an example of one that lets you edit the webpage like a document.

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