Features like Chrome Chrome Bookmarks

Let me first say that I have a problem: I need to fill the same web page many times, and the content I need to fill is for the most part the same, but is scattered throughout the web page.

The solution I was thinking about: I know that there is a way to create some javascript function that you placed behind the Google bookmark, so when you are on this page, you just click on this bookmark and it will do some things.

I was wondering if anyone used (or created) something like this. If you can do it yourself, how do you start with this? And can you use jquery?

If it’s possible to create it, I was also wondering if, when you click, it is possible to show a pop-up window to set several parameters so that I do not need to fill in the same 3, 4 times

+44
javascript jquery google-chrome bookmarks
Sep 18 '13 at 12:47 on
source share
4 answers

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

For example, here is a bookmarklet, which at startup will look for an element with id someElement on the page and, if found, assign "some value" to the value property:

 javascript:(function(){var d=document,e=d.getElementById("someElement");e.value="some value";})(); 
+68
Sep 18 '13 at 12:49 on
source share
β€” -

This bookmarklet creator comes in handy to compress your JavaScript into one line: http://mrcoles.com/bookmarklet/

+7
Feb 19 '17 at 2:14
source share
 javascript : { document.getElementById('PlateNo').value='0815';document.getElementById('AppRef').value='013007';document.getElementById('VehicleReg').value='MX53 YMD'; void(0) } 
0
Jul 29 '16 at 12:19
source share

For Mozilla use as

 javascript:function myFun(){ var d=document; var e=d.getElementById("someElement"); var e.value="some value"; }myFun(); 
0
Aug 17 '16 at 5:44
source share



All Articles