Note that there are some explanatory texts on larger screens.

plurals
  1. POFirefox Extension that copies HTML link to current web page to clipboard and not just the URL
    primarykey
    data
    text
    <h1>The Situation</h1> <p>I need to automate the copying of a HTML link to the current page that is viewed in the current Firefox Tab into other WYSIWYG editors. This is not the same as copying just the plain-text of the URL, nor is it the same as pasting just the plain-text of the web pages title. This is also not the same thing as navigating to some other web page that has the HTML link to the page of interest, selecting the text with the mouse cursor, and typing CTRL-C to copy it into the current operating systems clipboard (both Linux and Windows, should not make any difference). Only the update to the clipboard is to be automated; the pasting from the clipboard into the target application will be done manually.</p> <p>The desired <a href="http://en.wikipedia.org/wiki/Use_case" rel="nofollow noreferrer">use case</a> is as follows:</p> <ol> <li>The user browses to any web page from within Firefox.</li> <li>The user types some user-specified key sequence that is not in conflict with standard Firefox built-in key bindings.</li> <li>Firefox will then do only part of what <a href="http://www.2ality.com/2011/05/copy-link-bookmarklet.html" rel="nofollow noreferrer" title="Copy Link Bookmarklet">Copy Link Bookmarklet</a> does: Instead of opening up a new separate window/tab and constructing and rendering the HTML for the link, and then requiring the user to waste motion in selecting and copying the link into the clipboard, the extension will then format the HTML itself and copy that into the clipboard directly.</li> <li>The user then selects any of the targets described below and types CTRL-V to paste the formatted text.</li> <li>The user then sees the link as a link in that target area, and does <em>not</em> see anything literal like <code>http://...</code></li> </ol> <p>For example, if the webpage browsed to was <a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a>, and the user clicked the user-defined key sequence, and if the user pasted it into some Google Document, what they would see in that document is <em>not</em> <code>http://www.google.com</code> nor would they see <code>Google</code>, but instead would see what you would see when you read this in StackOverflow in a web browser: <a href="http://www.google.com" rel="nofollow noreferrer" title="Google">Google</a></p> <p>Now, there are Firefox extensions and bookmarklets that come close, but they all involve no net reduction in mouse motion and/or key press overhead, which is the most time-wasting aspect of this frequently occuring <a href="http://en.wikipedia.org/wiki/Use_case" rel="nofollow noreferrer">use case</a>. My searches for an existing extension turned up nothing that exactly meets my needs (see Research section below). Therefore, I think I may need to roll my own extension (or modify an existing one), unless someone can point me to an existing extension that provides this functionality.</p> <p>The extension I have in mind should work in Firefox version 11 or greater running on either Linux or any version of Windows. Only Firefox and a suitable Firefox extension should be needed, and not any other special software.</p> <p>Targets of the paste should be:</p> <ol> <li>GMail compose text areas</li> <li>Google Documents</li> <li>Microsoft Word documents</li> <li>Microsoft Outlook compose text areas.</li> <li>Any other WYSIWYG editor such as the Blogger post editor.</li> <li>Notepad (in which case it is the web page title that is pasted only and not the URL, or both the web page title and URL as separate plaintext; either way).</li> </ol> <p>About user-specified key bindings: If there was an extension already that did the above but without providing the ability to bind a keybinding to it, then I would expect to be able to use the <a href="http://kb.mozillazine.org/Keyconfig_extension" rel="nofollow noreferrer">keyconfig extension</a> extension to handle that aspect. Actually, that might even be preferable; I don't know yet.</p> <h1>Research</h1> <p>Below are approaches I investigated that came close to what I want, but did not exactly meet the need:</p> <ol> <li>Hacking on <a href="http://www.2ality.com/2011/05/copy-link-bookmarklet.html" rel="nofollow noreferrer" title="Copy Link Bookmarklet">Copy Link Bookmarklet</a> won't work because, from what I can tell, there is no way to update the OS's clipboard from a bookmarklet, hence why I think that a Firefox extension is required.</li> <li><a href="https://stackoverflow.com/questions/218462/in-a-firefox-extension-how-can-i-copy-rich-text-links-to-the-clipboard">In a Firefox extension, how can I copy rich text / links to the clipboard?</a></li> <li><a href="http://www.searchenginejournal.com/3-firefox-addons-to-easier-copy-links-and-anchor-texts/26742/" rel="nofollow noreferrer">3 FireFox Addons to Easier Copy Links and Anchor Texts</a> -- None of the extensions listed do what I want because they force you to use the right mouse button and navigate down one or two levels of context menu, which is wasted motion.</li> <li><a href="http://www.borngeek.com/firefox/colt/" rel="nofollow noreferrer">Copy Link Text (CoLT)</a> -- CoLT also supports copying a hyperlink and it’s associated text as a rich-text formatted link, however it does not include a default keybinding. It looks like <a href="http://forums.mozillazine.org/viewtopic.php?p=11852117#p11852117" rel="nofollow noreferrer">someone</a> else is attempting to tie keyconfig to CoLT, which might be an option as a solution.</li> <li><a href="http://copyurlplus.mozdev.org/index.html" rel="nofollow noreferrer" title="Copy URL Plus">Copy URL Plus</a> -- Looks like it has the copy-to-clipboard logic, but doesn't look like it has been maintained since Firefox 1.x timeframe.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload