зеркало из https://github.com/mozilla/gecko-dev.git
Bug 643191 - Add a "Copy Link" command to the context menu in Fennec [r=mfinkle]
This commit is contained in:
Родитель
4c25e7b62f
Коммит
c2a0a5dec5
|
@ -64,6 +64,11 @@ var ContextCommands = {
|
|||
null, browser.documentURI, true, null);
|
||||
},
|
||||
|
||||
copyLink: function cc_copyLink() {
|
||||
let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
|
||||
clipboard.copyString(ContextHelper.popupState.linkURL);
|
||||
},
|
||||
|
||||
shareLink: function cc_shareLink() {
|
||||
let state = ContextHelper.popupState;
|
||||
SharingUI.show(state.linkURL, state.linkTitle);
|
||||
|
|
|
@ -627,6 +627,9 @@
|
|||
<richlistitem class="context-command" id="context-saveimage" type="image-loaded" onclick="ContextCommands.saveImage();">
|
||||
<label value="&contextSaveImage.label;"/>
|
||||
</richlistitem>
|
||||
<richlistitem class="context-command" id="context-copy-link" type="link" onclick="ContextCommands.copyLink();">
|
||||
<label value="&contextCopyLink.label;"/>
|
||||
</richlistitem>
|
||||
<richlistitem class="context-command" id="context-share-link" type="link-shareable" onclick="ContextCommands.shareLink();">
|
||||
<label value="&contextShareLink.label;"/>
|
||||
</richlistitem>
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
<!ENTITY contextOpenInNewTab.label "Open Link in New Tab">
|
||||
<!ENTITY contextSaveLink.label "Save Link">
|
||||
<!ENTITY contextSaveImage.label "Save Image">
|
||||
<!ENTITY contextCopyLink.label "Copy Link">
|
||||
<!ENTITY contextShareLink.label "Share Link">
|
||||
<!ENTITY contextShareImage.label "Share Image">
|
||||
<!ENTITY contextBookmarkLink.label "Bookmark Link">
|
||||
|
|
Загрузка…
Ссылка в новой задаче