User:Dorumin/chat.js

importArticles({	type: "script",	articles: [		'u:embercastle:User:Dorumin/chat.js',		'u:embercastle:User:Dorumin/monobook.js'	] });

$('.User').first.before(' 150 ? &quot;0px&quot; : &quot;150px&quot;;$(&quot;.Chat&quot;).css({right:toggleWidth});">Hide Rail ');

/* (function {   if (mw.config.get('wgCanonicalSpecialPageName') !== 'Chat') return    function z(a, b) {        var d = x        if (b === 1) {            if (d.indexOf(a) === -1) {                d.push(a)                $('li[data-user="' + a + '"]').hide                y(d)            }        } else if (b === 2) {            if (d.indexOf(a) > -1) {                d.pop(d.indexOf(a))                $('li[data-user="' + a + '"]').show                y(d)            }        } else if (b === 3) {            $('.Chat ul').append('' + d.join(', ') + '')        }    }    function y(a) {        localStorage.setItem('mute', JSON.stringify(a))    }    function x {        return JSON.parse(localStorage.getItem('mute') || '[]')    }    $('textarea[name=message]').keypress(function(e) { if (e.which == 13) { var a = $(this).val, bc = '/mute', cc = '/unmute', dc = '/list'; d.shift d = d.join(' ') if (a[0] === '/') { e.preventDefault $(this).val('') if (this.value.indexOf(bc) > -1 && this.value.indexOf(bc) < 6) { z(d, 1) } else if (this.value.indexOf(cc) > -1 && this.value.indexOf(cc) < 8) { z(d, 2) } else if (this.value.indexOf(dc) > -1 && this.value.indexOf(dc) < 6) { z('', 3) }           }        }    })    window.mainRoom.model.chats.bind('afteradd', function { var a = x, i = 0; for (i; i < a.length; i++) { $('li[data-user="' + a[i] + '"]').hide }   }) });