зеркало из https://github.com/mozilla/gecko-dev.git
Bug 223766 - Allow brackets around nickname to be copied.
ChatZilla only. p=silver@warwickcompsoc.co.uk (James Ross) r=samuel
This commit is contained in:
Родитель
d7e1c742f8
Коммит
bfdaa76582
|
@ -226,6 +226,10 @@ a.chatzilla-link:hover {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.chatzilla-decor {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* mirc colors */
|
||||
.chatzilla-fg00 {
|
||||
color: #FFFFFF;
|
||||
|
|
|
@ -3937,6 +3937,19 @@ function __display(message, msgtype, sourceObj, destObj)
|
|||
if (fromUser && msgtype.match(/^(PRIVMSG|ACTION|NOTICE)$/))
|
||||
{
|
||||
var nick = sourceObj.unicodeName;
|
||||
var decorSt = "";
|
||||
var decorEn = "";
|
||||
|
||||
// Set default decorations.
|
||||
if (msgtype == "ACTION")
|
||||
{
|
||||
decorSt = "* ";
|
||||
}
|
||||
else
|
||||
{
|
||||
decorSt = "<";
|
||||
decorEn = ">";
|
||||
}
|
||||
|
||||
var nickURL;
|
||||
if ((sourceObj != me) && ("getURL" in sourceObj))
|
||||
|
@ -3952,18 +3965,12 @@ function __display(message, msgtype, sourceObj, destObj)
|
|||
getAttention = true;
|
||||
this.defaultCompletion = "/msg " + nick + " ";
|
||||
|
||||
if (msgtype == "ACTION")
|
||||
// If this is a private message, and it's not in a query view,
|
||||
// use *nick* instead of <nick>.
|
||||
if ((msgtype != "ACTION") && (this.TYPE != "IRCUser"))
|
||||
{
|
||||
logString += "* " + nick + " ";
|
||||
}
|
||||
else
|
||||
{
|
||||
// If this private message is not in a query view, use
|
||||
// *nick* instead of <nick>.
|
||||
if (this.TYPE == "IRCUser")
|
||||
logString += "<" + nick + "> ";
|
||||
else
|
||||
logString += "*" + nick + "* ";
|
||||
decorSt = "*";
|
||||
decorEn = "*";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -3979,41 +3986,20 @@ function __display(message, msgtype, sourceObj, destObj)
|
|||
client.prefs["nickCompleteStr"] + " ";
|
||||
}
|
||||
}
|
||||
if (msgtype == "ACTION")
|
||||
logString += "* " + nick + " ";
|
||||
else
|
||||
logString += "<" + nick + "> ";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Messages from us to somewhere...
|
||||
|
||||
if (toUser)
|
||||
// Messages from us, on a channel or network view, to a user
|
||||
if (toUser && (this.TYPE != "IRCUser"))
|
||||
{
|
||||
// From us to a user.
|
||||
|
||||
if (this.TYPE == "IRCUser")
|
||||
{
|
||||
if (msgtype == "ACTION")
|
||||
logString += "* " + nick + " ";
|
||||
else
|
||||
logString += "<" + nick + "> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
nick = destObj.unicodeName;
|
||||
logString += ">" + nick + "< ";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (msgtype == "ACTION")
|
||||
logString += "*" + nick + " ";
|
||||
else
|
||||
logString += "<" + nick + "> ";
|
||||
nick = destObj.unicodeName;
|
||||
decorSt = ">";
|
||||
decorEn = "<";
|
||||
}
|
||||
}
|
||||
// Log the nickname in the same format as we'll let the user copy.
|
||||
logString += decorSt + nick + decorEn + " ";
|
||||
|
||||
// Mark makes alternate "talkers" show up in different shades.
|
||||
//if (!("mark" in this))
|
||||
|
@ -4033,6 +4019,8 @@ function __display(message, msgtype, sourceObj, destObj)
|
|||
if (nick && (nick.length > client.MAX_NICK_DISPLAY))
|
||||
blockLevel = true;
|
||||
|
||||
if (decorSt)
|
||||
msgRowSource.appendChild(newInlineText(decorSt, "chatzilla-decor"));
|
||||
if (nickURL)
|
||||
{
|
||||
var nick_anchor =
|
||||
|
@ -4047,6 +4035,8 @@ function __display(message, msgtype, sourceObj, destObj)
|
|||
{
|
||||
msgRowSource.appendChild(newInlineText(nick));
|
||||
}
|
||||
if (decorEn)
|
||||
msgRowSource.appendChild(newInlineText(decorEn, "chatzilla-decor"));
|
||||
canMergeData = this.prefs["collapseMsgs"];
|
||||
}
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче