Script To Copy Link URL to clipboard.
I create an another javascript for FireGestures. The function is to copy URL of the link to system clipboard/cut buffer. Basically it should work on any systems such as Linux, Windows or Mac OS X.
I like to use FireGestures on firefox browser, and made some user scripts to extend the funtion. This script is useful when you download media files by using download scripts instead of viewing on the browser. I made it to use when I want to get sequencial images or video files with incwget, and download videos from YouTube with ytdownloader.pl. Mozilla supports the function with right button menu, but I often feel irritated to copy many URLs.
The code is here;
var linkURL = FireGestures.getLinkURL();
if (!linkURL)
throw FireGestures.getLocaleString("ERROR_NOT_ON_LINK");
var clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelp
er);
clipboard.copyString(linkURL);