User:Segmentation fault/global.js

importArticles({   type: 'script',    articles: [        'w:dev:PortableCSSPad/code.js'    ] });

$(function {   function checkPing {        var username = mw.config.get('wgUserName');        var pingPhrases = $('#check-ping-phrases').val.split(',');        var pingSound = new Audio('https://www.myinstants.com/media/sounds/inceptionbutton.mp3');        $('.Chat li .message').each(function { if ($.trim($(this).prevAll('.username:first').text) === username) { return; }           if (!$(this).hasClass('ping-checked')) { for (var i = 0; i < pingPhrases.length; i++) { if ($(this).text.toString.indexOf($.trim(pingPhrases[i])) !== -1) { $(this).css('color', 'red'); pingSound.play; break; }               }                $(this).addClass('ping-checked'); }       });    }    if (mw.config.get('wgCanonicalSpecialPageName') === 'Chat') {        $pingPhrasesBox = $(' Список пингов  ');        $('.ChatHeader > .wordmark').append($pingPhrasesBox);        $('#check-ping-phrases').val(mw.config.get('wgUserName'));        $('#check-ping-phrases-link').click(function(e) { $('#check-ping-phrases').toggle(300); });       setInterval(checkPing, 1000);    } });