Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- importScript('User:Joeytje50/chatmsg.js')
- onchatmessage = function(text, rawtext) {
- setTimeout(function() {
- /* Add chat-mod class in the chat itself to chat mods */
- $('.WikiChatList .User.chat-mod .username').each(function() {
- $('.Chat li[data-user="'+this.innerHTML+'"]').addClass('chat-mod');
- });
- /* Add seconds to timestamps */
- var d = new Date();
- var time = pad(d.getHours()) + ':' + pad(d.getMinutes()) + ':' + pad(d.getSeconds());
- var selector = $('form+.Chat ul li:last-child:not(.inline-alert) .time');
- if (selector.length && selector.html().split(':').length != 3) {
- selector.html(time);
- }
- }, 20)
- //Make the (qc) emot fit in the line better
- text = text.replace((new RegExp('<img src=["\']http://i.imgur.com/DexQI.png["\'] width=["\']19["\'] height=["\']19["\']')), '<img src="http://images2.wikia.nocookie.net/runescape/images/d/de/Quick_chat_button.png" style="width:13px;height:10px;"')
- return text; //DO NOT EDIT THIS LINE
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement