Here is what I would like to be able to do: In a web-browser I want to add a button that when I click on it, it copies the current URL address into a file or opens another web-browser and copies it there. I don't know what programming language should be used for this, I am a novice in this area and am looking for pointers on what programming language is appropriate for this and how it can be done. Any web-browser, IE, Chrome, or Firefox is ok to be used for this. If it is not possible to put the buttom in the web-browser, what is any otherway that it can be done?
Asked
Active
Viewed 466 times
1 Answers
0
Would something in the bookmarks toolbar be enough?
If so, create a shortcut/favorite with URL:
javascript:window.open(document.URL);undefined;
and put it the bookmarks toolbar.
The first part opens a new window with the URL of the current window, the undefined
part is so the current window is not replaced (it seemed to be needed for Firefox, otherwise the return value is used to replace the current window's content).
Tested to work in Firefox, Chrome and IE, although IE I needed to disable the popup blocker.

prunge
- 22,460
- 3
- 73
- 80
-
*"I needed to disable the popup blocker"* Let that be a stern warning to anyone who tries to achieve this type of thing. – Andrew Thompson Nov 01 '11 at 05:35
-
Thanks @prunge, it is an interesting solution and did work. Is there any ways to: 1. Write a small executable code that user just click on it and it adds the above to the favorite? If I want to ask people who are not computer savvy it is very hard for them to do this.However, if it is like an executable they can easily do it. 2. I still would like to be able to copy the URL to a file after clicking on a button or on the button on the favorite that you suggested, is there any way to do this? 3. And finally what is the best language for doing this type of work? JavaScript? Java? HTML...? – TJ1 Nov 01 '11 at 14:36
-
@TJ1 If you need something that is installable by end-users, it might be better to go down the route of writing a browser plugin. Firefox addons are written in Javascript. See [this](http://stackoverflow.com/questions/24772/how-do-i-write-a-firefox-addon) and [this](http://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/). – prunge Nov 02 '11 at 06:26