I finally managed to create an extension for Google Chrome browser. While this extension is not an exact replica of the extension – MakeBookmark – I developed for the Firefox browser (https://addons.mozilla.org/en-US/firefox/addon/make-bookmark-216811/), I make do.
The main difference between the Firefox version and the Google Chrome version is that I have till date not figured out how to get access to the name of the anchor tag that the user has right-clicked. In other words, when a user right-clicks a link (URL), I am unable to get the URL text, while I am able to get the URL name.
What does the extension do? It allows me to copy the name of the URL and its link to the clipboard in one stroke, from where I can copy it into my bookmark file. Given that I end up using different browsers at different points in time, storing bookmarks in a plain text file (with some descriptive tags) makes more sense for me, rather than having bookmarks in each browser (Internet Explorer, Chrome and Firefox).
How to use it? Select the URL you wish to copy and then right click on it. You will be presented with a menu to copy information to the clipboard. Once you do that, you can paste the name of the URL and its link into any application.
It is also possible to remove the re-direction information that Google Search usually adds to the link as part of the copy operation.
Given below is the source code of the extension.
To make an extension, you need to put together a ‘manifest.json’, that has some details of the extension.
"name": "Make Bookmark",
"description": "Copy to clipboard, a bookmark created from the URL text and address.",
"default_title": "Make Bookmark",
For obvious reasons, I have not included the icons.
To add the extension to Google Chrome you can either drop the packaged extension into it or point the browser to the directory that contains the files.
Have fun with this extension. You it to build your own.