Welcome Guest (  Login Register  ) Tracker Tracker   * FAQ   * Search
It is currently Thu Sep 02, 2010 3:46 pm




Post new topic  Reply to topic 
 [ 4 posts ] 
Author Message
Sat Jun 11, 2005 10:20 am
  Post [Feature Request] Copy Image URL
User avatar
Offline
Semi-Fan
Semi-Fan

Joined: Sat Jun 11, 2005 8:11 am
Posts: 59
When I right-click on a image, there should be a command called "Copy Image URL" in the menu, so that I could easily post that image on a forum with the img command of BBCode.

Profile
Author Message
Sat Jun 11, 2005 11:01 am
  Post
User avatar
Offline
AvantGuard
AvantGuard
Avant Guru

Joined: Tue May 06, 2003 11:35 pm
Posts: 3602
Location: Tampa, Florida, USA
Windows Version: N/A
Avant Browser Version: N/A
Orca Browser Version: N/A
IE Version: N/A
I can show you how to have that feature in Avant and IE. Are you ready? OK, here we go then...

A fine IE time saver


This trick allows to copy the url of a target image in a web page. You can do this for any anchor link by right-clicking and choosing Copy shortcut. This copies the target url in your clipboard. And if this link encloses an image, this copies the target url, regardless the image.

What now if what you want is the url of the image itself? When you right-click an image, there is no Copy image shortcut option to play with. This comes to me as a necessary time saver since I find myself linking to some image every time in the weblog, at work, and so on. And I believe this is probably the kind of things that you also do more often than not.

Without a Copy image shortcut option, I have to get right into the html source code, look for the text near the image, and hopefully will find it. All of this is not long, takes a minute, but is way unnecessary.

That's why I have built a small shortcut that adds itself in the context menu any time your right-click an image, whether it's embedded by an anchor or not. And this trick works for Internet Explorer only (and all web browsers based on the web browser control hopefully).

The general extension technique is detailed in this MSDN paper.

Here is what to do :

Open the following registry key : HKEY_CURRENT_USER / Software / Microsoft / Internet Explorer / MenuExt
Create a subkey named Copy image Shortcut (or whatever name you decide to put. That's the name of the context menu option)
In this new subkey, change the default value and make it point to an external file we are going to create later. In my case I put this : c:\tmp\CopyLinkShortcut.html.
In this new subkey, add a DWORD value called contexts, and assign it the value 2. This value tells Internet Explorer to add this menu option only when we right-click on an image.
Create a new file, for instance c:\tmp\CopyLinkShortcut.html, and put the following content in it :
<script language="javascript">
var img = external.menuArguments.event.srcElement;
clipboardData.setData("Text",img.src);
</script>

Close all Internet Explorer sessions. Restart. You are done.
Please note the trick works even if the clipboard access is set to Disabled in the Internet Explorer options. That's because our external file is a local file, and hence security access does not apply.



Enjoy!
Stephane Rodriguez- January 10, 2004.


This works PERFECTLY! I've been using this Registry hack for quite a while now. Nothing could be easier.

Enjoy!

~Eric


Image
Profile
Author Message
Sat Jun 11, 2005 1:50 pm
  Post
User avatar
Offline
Semi-Fan
Semi-Fan

Joined: Sat Jun 11, 2005 8:11 am
Posts: 59
vtel57 wrote:
I can show you how to have that feature in Avant and IE. Are you ready? OK, here we go then...

A fine IE time saver


This trick allows to copy the url of a target image in a web page. You can do this for any anchor link by right-clicking and choosing Copy shortcut. This copies the target url in your clipboard. And if this link encloses an image, this copies the target url, regardless the image.

What now if what you want is the url of the image itself? When you right-click an image, there is no Copy image shortcut option to play with. This comes to me as a necessary time saver since I find myself linking to some image every time in the weblog, at work, and so on. And I believe this is probably the kind of things that you also do more often than not.

Without a Copy image shortcut option, I have to get right into the html source code, look for the text near the image, and hopefully will find it. All of this is not long, takes a minute, but is way unnecessary.

That's why I have built a small shortcut that adds itself in the context menu any time your right-click an image, whether it's embedded by an anchor or not. And this trick works for Internet Explorer only (and all web browsers based on the web browser control hopefully).

The general extension technique is detailed in this MSDN paper.

Here is what to do :

Open the following registry key : HKEY_CURRENT_USER / Software / Microsoft / Internet Explorer / MenuExt
Create a subkey named Copy image Shortcut (or whatever name you decide to put. That's the name of the context menu option)
In this new subkey, change the default value and make it point to an external file we are going to create later. In my case I put this : c:\tmp\CopyLinkShortcut.html.
In this new subkey, add a DWORD value called contexts, and assign it the value 2. This value tells Internet Explorer to add this menu option only when we right-click on an image.
Create a new file, for instance c:\tmp\CopyLinkShortcut.html, and put the following content in it :
<script language="javascript">
var img = external.menuArguments.event.srcElement;
clipboardData.setData("Text",img.src);
</script>

Close all Internet Explorer sessions. Restart. You are done.
Please note the trick works even if the clipboard access is set to Disabled in the Internet Explorer options. That's because our external file is a local file, and hence security access does not apply.



Enjoy!
Stephane Rodriguez- January 10, 2004.


This works PERFECTLY! I've been using this Registry hack for quite a while now. Nothing could be easier.

Enjoy!

~Eric


Thanks, Eric. I modified my registry according to the instructions you provided, and it worked great. However, I still hope this feature will be added to the next version of Avant Browser, so I don't have to modify my registry each time after I restore my system.

Profile
Author Message
Sat Jun 11, 2005 3:02 pm
  Post
User avatar
Offline
AvantGuard
AvantGuard
Avant Guru

Joined: Tue May 06, 2003 11:35 pm
Posts: 3602
Location: Tampa, Florida, USA
Windows Version: N/A
Avant Browser Version: N/A
Orca Browser Version: N/A
IE Version: N/A
Yeah, it would be a good item for Avant to have. I agree with you there. Besides, many folks don't even have a clue what a "Registry" is, nevermind modifying it.

In the meantime... ENJOY!

Regards,

~Eric


Image
Profile
« Previous topic Next topic »

Reply to topic  [ 4 posts ] 

Return to Avant Browser Requests



Who is online

Users browsing this forum: No registered users


The teamDelete all board cookies • All times are UTC [ DST ]


Avant Browser Chinese Forum
phpBB - Creating Communities
Avant Browser style designed by Statm1



Privacy Policy Copyright ©1999-2010, Avant Force. All rights reserved.