Bug 973195 - [e10s] Change Copy Link in context-menu to use JS instead of cmd_copyLink. r=felipe

This commit is contained in:
Tom Schuster 2014-02-24 23:10:12 +01:00
parent 748d773593
commit 288af30ff5
2 changed files with 7 additions and 1 deletions

View File

@ -56,7 +56,7 @@
<menuitem id="context-copylink"
label="&copyLinkCmd.label;"
accesskey="&copyLinkCmd.accesskey;"
oncommand="goDoCommand('cmd_copyLink');"/>
oncommand="gContextMenu.copyLink();"/>
<menuseparator id="context-sep-copylink"/>
<menuitem id="context-media-play"
label="&mediaPlay.label;"

View File

@ -1330,6 +1330,12 @@ nsContextMenu.prototype = {
clipboard.copyString(addresses, document);
},
copyLink: function() {
var clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
getService(Ci.nsIClipboardHelper);
clipboard.copyString(this.linkURL, document);
},
///////////////
// Utilities //
///////////////