зеркало из https://github.com/mozilla/pjs.git
Bug #282491 --> Add a button to the phishing bar that allows the user to say "this msg is not an e-mail scam"
This commit is contained in:
Родитель
e15c6a5e3e
Коммит
b2a110edd4
|
@ -2202,6 +2202,16 @@ var gMessageNotificationBar =
|
|||
// aUrl is the nsIURI for the message currently loaded in the message pane
|
||||
setPhishingMsg: function(aUrl)
|
||||
{
|
||||
var msgURI = GetLoadedMessage();
|
||||
if (msgURI && !(/type=x-message-display/.test(msgURI)))
|
||||
{
|
||||
var msgHdr = messenger.messageServiceFromURI(msgURI).messageURIToMsgHdr(msgURI);
|
||||
// if we've explicitly marked this message as not being an email scam, then don't
|
||||
// bother checking it with the phishing detector.
|
||||
if (msgHdr && msgHdr.getUint32Property("notAPhishMessage"))
|
||||
return;
|
||||
}
|
||||
|
||||
// The Junk message takes precedence over the phishing message...so skip this step
|
||||
// if the message is already marked as junk
|
||||
if (this.mMsgNotificationBar.selectedIndex != kMsgNotificationJunkBar && isMsgEmailScam(aUrl))
|
||||
|
@ -2245,6 +2255,26 @@ function LoadMsgWithRemoteContent()
|
|||
}
|
||||
}
|
||||
|
||||
function MsgIsNotAScam()
|
||||
{
|
||||
// we want to get the msg hdr for the currently selected message
|
||||
// change the "isPhishingMsg" property on it
|
||||
// then reload the message
|
||||
|
||||
var msgURI = GetLoadedMessage();
|
||||
var msgHdr = null;
|
||||
|
||||
if (msgURI && !(/type=x-message-display/.test(msgURI)))
|
||||
{
|
||||
msgHdr = messenger.messageServiceFromURI(msgURI).messageURIToMsgHdr(msgURI);
|
||||
if (msgHdr)
|
||||
{
|
||||
msgHdr.setUint32Property("notAPhishMessage", 1);
|
||||
MsgReload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function MarkCurrentMessageAsRead()
|
||||
{
|
||||
gDBView.doCommand(nsMsgViewCommandType.markMessagesRead);
|
||||
|
|
|
@ -1945,19 +1945,21 @@
|
|||
<image id="junkBarImage"/>
|
||||
<description flex="1" class="msgNotificationBarText">&junkBarMessage.label;</description>
|
||||
<spacer flex="1"/>
|
||||
<button label="¬JunkButton.label;" oncommand="JunkSelectedMessages(false)"/>
|
||||
<button label="¬JunkButton.label;" oncommand="JunkSelectedMessages(false);"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="remoteContentBar" class="msgNotificationBar" align="center">
|
||||
<image id="remoteContentImage"/>
|
||||
<description flex="1" class="msgNotificationBarText">&remoteContentMessage.label;</description>
|
||||
<spacer flex="1"/>
|
||||
<button label="&loadRemoteContentButton.label;" oncommand="LoadMsgWithRemoteContent()"/>
|
||||
<button label="&loadRemoteContentButton.label;" oncommand="LoadMsgWithRemoteContent();"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="phishingBar" class="msgNotificationBar" align="center">
|
||||
<image id="phishingBarImage"/>
|
||||
<description flex="1" class="msgNotificationBarText">&phishingBarMessage.label;</description>
|
||||
<spacer flex="1"/>
|
||||
<button label="&removePhishingBarButton.label;" oncommand="MsgIsNotAScam();"/>
|
||||
</hbox>
|
||||
</deck>
|
||||
|
||||
|
|
|
@ -598,11 +598,12 @@
|
|||
<!ENTITY junkInfoButton.label "?">
|
||||
|
||||
<!-- Remote Content Bar -->
|
||||
<!ENTITY remoteContentMessage.label "To protect your privacy, &brandShortName; has blocked remote images in this message." >
|
||||
<!ENTITY remoteContentMessage.label "To protect your privacy, &brandShortName; has blocked remote images in this message.">
|
||||
<!ENTITY loadRemoteContentButton.label "Show Images">
|
||||
|
||||
<!-- Phshing bar Bar -->
|
||||
<!ENTITY phishingBarMessage.label "&brandShortName; thinks this message might be an email scam." >
|
||||
<!ENTITY phishingBarMessage.label "&brandShortName; thinks this message might be an email scam.">
|
||||
<!ENTITY removePhishingBarButton.label "Not a Scam">
|
||||
|
||||
<!-- Search Bar -->
|
||||
<!ENTITY quickSearchCmd.key "k">
|
||||
|
|
Загрузка…
Ссылка в новой задаче