I am creating a Greasemonkey script that further extends an already existing Greasemonkey script that is called dAx (dAmn.extend). dAx works on deviantART's chat client, dAmn. dAx has many subcommands that work with dAmn, but the one I am focusing on is the Away function. If you type /setaway [message], it posts *Username is away: [Message] and then you can remove that away by /setback'ing which returns *Username has returned from away. When a user highlights (mentions another user's username) the message gains a white background and if /setaway is active, it returns Username2: I am currently away, reason: [Message]. When a user has been in an active chat long enough, older messages start to disappear. My part of this script is to make it store the messages to the user while the user was away and repeat it in a private window on /setback. I've managed to have it do a simple storage by just setting the chatroom it was posted in, timestamp, username, and message in a variable: timeForm = hour + ':' + minutes + ':' + seconds + (userAM?" "+(ohour>12?"pm":"am"):""); twForm = "#"+current.split(':')+", "+timeForm; messForm = twForm+' ::'+from+':: '+body+"
"; (Outputs: #Chatroom, 13:17:21 ::Username2:: Username: Are you there?)But if there were multiple highlighting, it would just return the first message highlighted. I want to know how I can make a loop for each highlighting that occurs. Here is the script: http://hypnocloud.mywebcommunity.org/... Just click the button View Script Source when the window pops up.Search for "while ago" to get to the function where someone highlights you. Under that a couple functions is the /setback function.