fix chat player highlighting
- clicking on names now inserts them - fix: if your name was @mentioned, followed by another @player, it didn't mark the line
This commit is contained in:
parent
af4ee26575
commit
3a8ea9161b
10
code/chat.js
10
code/chat.js
@ -281,9 +281,13 @@ window.chat.writeDataToHash = function(newData, storageHash, skipSecureMsgs) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'AT_PLAYER':
|
case 'AT_PLAYER':
|
||||||
msgToPlayer = (markup[1].plain == ('@'+window.PLAYER.nickname));
|
var thisToPlayer = (markup[1].plain == ('@'+window.PLAYER.nickname));
|
||||||
var spanClass = msgToPlayer ? "pl_nudge_me" : (markup[1].team + " pl_nudge_player");
|
var spanClass = thisToPlayer ? "pl_nudge_me" : (markup[1].team + " pl_nudge_player");
|
||||||
msg += $('<div/>').html($('<span/>').attr('class', spanClass).text(markup[1].plain)).html();
|
msg += $('<div/>').html($('<span/>')
|
||||||
|
.attr('class', spanClass)
|
||||||
|
.attr('onclick',"window.chat.addNickname('"+markup[1].plain+"')")
|
||||||
|
.text(markup[1].plain)).html();
|
||||||
|
msgToPlayer = msgToPlayer || thisToPlayer;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'PORTAL':
|
case 'PORTAL':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user