Tuesday, February 20, 2007

Firefox & IE - Copy Context Menu Plugin

I have created a set of browser plugins that are pretty helpful for developers and I thought that I should share them. I have created basically the same plugin for both IE and Firefox. What it does is add a "Copy As Html" and "Copy As Plain Text" to the context (right-click) menu. It is useful if you want to copy the text or underlying html from a web page into word, outlook or visual studio. Below is a setup file that sort of automates the installation. It will install the IE plugin completely and it will copy the file for the Firefox plugin. You will have to manually open the firefox plugin using firefox and choose "Install" to complete the firefox plugin installation. The plug-in should be installed here: "C:\Program Files\Fillmore Technology Group\Utilities\Firefox\copyMenu_- 1.3.0-fx.xpi", but the actual location will be on the bottom of the last form in the setup wizard. Since there are plenty of resources on the web that explain how to program these, I am not going to go into any detail on how it was accomplished. I will say that the end result was pretty simple to do, but finding all the information took a little time.
Copy Menu (MSI Installer) - About 106 KB
Copy Menu (Full Windows Installer) - About 3.39 MB - not recommended
Update: The Firefox plugin can be installed from the Firefox Add-on site (It now works with 3.6): https://addons.mozilla.org/firefox/4554
or from here: Install Extended Copy Menu 1.3 - out dated
Firefox Internet Explorer

29 Comments:

At 2/22/2007 2:16 PM , Anonymous Dan Osborne said...

This is a very good idea.

It works very well in Firefox except when the entire line is a link.

On the Firefox page that describes the plug-in, all the links copy perfectly except for "Add your own comment" and "Read all comments".

Other than this one blemish, the plug-in is brilliant. Very helpful!

 
At 2/26/2007 5:42 PM , Anonymous kraken said...

How can I send you a version of this extension in spanish?

 
At 2/27/2007 7:57 AM , Blogger quamtar said...

Kraken,
Send it to rccode [at] gmail [dot] com

 
At 2/27/2007 11:24 AM , Anonymous markh said...

I have just sent a localized version to the above email address, providing the possibility to get a bunch more translations in one go.

 
At 3/12/2007 1:19 PM , Anonymous Anonymous said...

Thank you for the Add-on, what I think will add great value is to be able to copy content, and paste in Word without Word downloading images again. It is really frustrating opening a page with images (slow); copying and pasting into MS Word only to have "MS Word" freeze while downloading the images again. Seems that copy only copies the URL of images, and not the actual content? Seems a waste of resources to download the same images? Is it a feasible option to have a "Copy Downloaded Content" option? I suppose so; if you have someone capable of solving the problem. Thanks for contributing a number off Add-ons that I am using!

 
At 5/15/2007 1:43 PM , Anonymous Anonymous said...

Where can i find the code?

What i want.

Select text
Right mouse
menuitem: Google Search

Marco

 
At 6/05/2007 1:42 PM , Blogger ekbworldwide said...

Sorry about the multiple posts - a combination of blogger, firefox and me was acting weirdly.

 
At 7/12/2007 8:27 PM , Blogger Fer said...

Hi,

Great idea!!!

Anyway my point goes to : "Have you build the IE Addon in .NET?" I'm a .NET developer trying to build an IE Addon that insert some lines of javascript inside each page for a particular website.
Can you give some ideas on how to do it? I start looking at BHO but I can not find the way to do what I want.

Hope to hear from you soon. If you don't mind mail me to fernaramburu@hotmail.com

thanks a lot.

Fernando

 
At 10/07/2007 3:51 PM , Blogger ekbworldwide said...

Hmmm...
I forgot that I already posted a comment
-> 6/05/2007 1:42 PM
But my comment doesn't make much sense to me. Anyway, moving right along...

I can't figure out why links at
http://www.tiscali.co.uk/reference/dictionaries/difficultwords/data/content_a.html
don't work if you copy html. The complete path is not copied.

example

(x href="/reference/dictionaries/difficultwords/data/d0000100.html")a cappella, a capella(xa)(xbr)

If I copy links using
copy links
https://addons.mozilla.org/en-US/firefox/addon/605
the entire path is copied.

I've had this problem at other sites. What's the problem? What's the solution?

 
At 10/08/2007 12:33 PM , Anonymous John said...

Works Great with Firefox for Mac OSX.Is it possible to take it one step further and have it call (open) an AppleScript application (on my local machine) that gets the clipboard into an AppleScript variable for further processing?

 
At 11/21/2007 7:00 AM , Anonymous Anonymous said...

Can't get the difference between the standard 'Copy' and the extra item in my context menu 'Copy plain text'? Can you see any point?

 
At 11/22/2007 10:12 AM , Anonymous Anonymous said...

Hi

Great stuff, works flawlessly in Firefox. Would it possible to supress the standard 'copy' it just wastes space now.

 
At 11/29/2007 8:17 AM , Anonymous Anonymous said...

or just remove 'Copy as plain text'

 
At 12/19/2007 4:34 PM , Anonymous Bill said...

Great add-on! Thanks!

One question - what is the name of the BHO? When looking in IE7 Add-ons manager, I don't see it listed.

 
At 4/27/2008 1:47 AM , Anonymous Anonymous said...

Extended Copy Menu
Locales in New version on AMO (1.5) works not.
The updated version for download is available here:
http://www.box.net/shared/jr3jkwhwkw

regards,
Steve

 
At 5/31/2008 10:30 PM , Blogger Brass said...

Is there a way to have this copy as BBCode/Forum Code?

Mainly the links, such as copying a paragraph from a news story with a couple links inside the paragraph that point to other stories, but format the links at [url='link']text[/url] for a Forum Post?

This would be a Most Excellent Addition!

 
At 6/03/2008 1:08 AM , Anonymous Anonymous said...

It would bee nice if "copy as plain text" can overwrite the normal "copy". I mean if "ctrl+c" is using "copy as plain text" (like the extension https://addons.mozilla.org/en-US/firefox/addon/134 because this is not updated for firefox 3)

 
At 6/12/2008 7:37 AM , Blogger Grinn said...

I don't get the "Copy as HTML" feature. Doesn't the default copy copy as HTML?

 
At 6/14/2008 7:14 AM , Anonymous Anonymous said...

Like many, I'm using this to replace "Copy Plain Text", which is not FF3 compatible.

It works well, though the style guy in me really, really wants to fix the lack of proper first capital letters in "Copy as plain text". It's right in all the screen shots, but apparently the "A" "P" and "T" got kicked to lower case when you added the shortcut help!

And technically, "HTML" should be all caps...

Anyway, no biggie, I'll get used to it :) And again, this saved me in FF3!

 
At 6/17/2008 4:13 PM , Blogger Andy said...

Could you include a feature I've been hacking into your extension for a friend, so I don't have to do it every time you release a new one? A friend of mine likes to paste "plain text" quotes from the web, but the problem is a ton of websites these days use "fancy" double quotes, single quotes, "em" dashes, etc, which just don't paste well into vi or your average text editor.... anyway, here is the enhancement to your javascript to do this: (for others that want to hack it yourself, find were your firefox extensions are installed, and drill down all the way to copyMenu.js and replace 'gClipboardHelper.copyString(objSelection);' with:

var str = objSelection.toString();
str = str.replace(/\u2018/g,'\'');
str = str.replace(/\u2019/g,'\'');
str = str.replace(/\u201d/g,'\"');
str = str.replace(/\u201c/g,'\"');
str = str.replace(/\u2011/g,' - ');
str = str.replace(/\u2012/g,' - ');
str = str.replace(/\u2013/g,' - ');
str = str.replace(/\u2014/g,' - ')
gClipboardHelper.copyString(str);

 
At 6/22/2008 8:24 AM , Blogger FunPuppets said...

This is HUGE. I need this every day. To be able to copy phone numbers, addresses, directions to a word document, spreadsheet, or other application without the font formatting saves tremendous amounts of time. If you’re a blogger and want to quote from one site without their font formatting, is another use. A person generally has to 1) copy it, 2) paste it to a notepad 3) copy it again, and then 4) paste it where I wanted it to go. Now it’s just 1 and 2 and it will assume the destination’s font formatting, if I have that preset.

I formally used the extension “PlainText” but its not available yet for Firefox 3.0.

I tested the copy HTML with this extension and I’m happily pleased with this too. It copies the page’s html source code of the area you have dragged and copied. I can see how this will be an easy quick way of seeing one little section of a source code without having to scroll down through a whole page of source code.

I wish I could use this extension in every program ever made

 
At 6/16/2009 7:49 AM , Anonymous Martin said...

I like this extension a lot. Will you update the version so that it installs with Firefox 3.5?

 
At 6/18/2009 8:36 AM , Blogger quamtar said...

I updated the version info so the plugin will install with firefox 3.5. I have not done much testing, let me know if there are issues.

 
At 1/15/2010 5:43 AM , Blogger Roebie said...

Hi Quamtar,
Very nice addon.
There seems to be a bug however.
When selecting the text from the "1." until "Raad." on http://nl.wikipedia.org/wiki/2010#Januari the links get copied wrong.
In source code they are defined as relative paths (/wiki/Herman_Van_Rompuy) but once you copy them with the addon the should have full paths (http://nl.wikipedia.org/wiki/Herman_Van_Rompuy) otherwise the links won't work.
Could you please fix that?
Thanks

 
At 1/21/2010 10:37 PM , Blogger Nate said...

Firefox 3.6 support coming soon? Great add-on, by the way.

 
At 1/22/2010 2:46 AM , Anonymous Anonymous said...

Great extension. Will you update the version so that it installs with Firefox 3.6?

 
At 1/22/2010 10:36 AM , Blogger quamtar said...

I have updated the addon site to allow it to be installed on Firefox 3.6

 
At 1/23/2010 2:12 PM , Blogger gtucson said...

when will you provide for your copy context menu to be compatible with the new Firefox 3.6?

 
At 1/28/2010 6:46 PM , Anonymous Anonymous said...

Thanks so much for updating this for 3.6. I use it all the time.

 

Post a Comment

Links to this post:

Create a Link

<< Home