Bug 711779 - Add Bookmark This Link to feeds' Website header link context menu. r+moa=Mnyromyr
This commit is contained in:
Родитель
29aec8166e
Коммит
506d7c4340
|
@ -46,6 +46,8 @@
|
|||
<!ENTITY CreateFilterFrom.accesskey "F">
|
||||
<!ENTITY copyLinkCmd.label "Copy Link Location">
|
||||
<!ENTITY copyLinkCmd.accesskey "C">
|
||||
<!ENTITY bookmarkLinkCmd.label "Bookmark This Link…">
|
||||
<!ENTITY bookmarkLinkCmd.accesskey "B">
|
||||
<!ENTITY CopyMessageId.label "Copy Message-ID">
|
||||
<!ENTITY CopyMessageId.accesskey "C">
|
||||
<!ENTITY OpenMessageForMsgId.label "Open Message For ID">
|
||||
|
|
|
@ -1699,6 +1699,24 @@ function CopyWebsiteAddress(websiteAddressNode)
|
|||
}
|
||||
}
|
||||
|
||||
function BookmarkWebsite(aWebsiteAddressNode)
|
||||
{
|
||||
if (aWebsiteAddressNode)
|
||||
{
|
||||
let websiteAddress = aWebsiteAddressNode.getAttribute("value");
|
||||
|
||||
if (currentHeaderData && "content-base" in currentHeaderData)
|
||||
{
|
||||
let url = currentHeaderData["content-base"].headerValue;
|
||||
if (url != websiteAddress)
|
||||
return;
|
||||
|
||||
let title = currentHeaderData["subject"].headerValue;
|
||||
PlacesUIUtils.showMinimalAddBookmarkUI(makeURI(url), title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var attachmentAreaDNDObserver = {
|
||||
onDragStart: function (aEvent, aAttachmentData, aDragAction)
|
||||
{
|
||||
|
|
|
@ -130,7 +130,8 @@
|
|||
</menupopup>
|
||||
|
||||
<menupopup id="copyUrlPopup">
|
||||
<menuitem label="©LinkCmd.label;" accesskey="©LinkCmd.accesskey;" oncommand="CopyWebsiteAddress(document.popupNode)"/>
|
||||
<menuitem label="©LinkCmd.label;" accesskey="©LinkCmd.accesskey;" oncommand="CopyWebsiteAddress(document.popupNode);"/>
|
||||
<menuitem label="&bookmarkLinkCmd.label;" accesskey="&bookmarkLinkCmd.accesskey;" oncommand="BookmarkWebsite(document.popupNode);"/>
|
||||
</menupopup>
|
||||
|
||||
<hbox id="msgHeaderView" keywordrelated="true" originalclass="none" persist="state">
|
||||
|
|
Загрузка…
Ссылка в новой задаче