User:Wilson P./global.js

/*Чатхаки*/ importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); /*Опции*/ importScriptPage('w:c:dev:ChatOptions/code.js'); /*Импорты*/ function loadChatScripts { importArticles({   type: "script",    articles: [        "w:c:dev:ChatOptions/code.js",        "w:c:dev:ChatObject/code.js",        "MediaWiki:CustomChatTags.js",        "w:c:d97:MediaWiki:TitleNotifications.js"    ]    }); mainRoom.maxCharacterLimit = 3000; $("#join-alert").remove; chatIsLoaded = true; } var loadedTester = setInterval(function {  if(typeof mainRoom !== "undefined") {       importScriptPage("MediaWiki:JacobsLadderSuite.js","d97"); // import the API       setTimeout(function { loadChatScripts; },500);      clearInterval(loadedTester);       console.log("[CHAT.JS] Chat.js loading complete.");   } },100); function appendTimestamps { if(cwmLoaded === true) { timer = new Date; hours = timer.getHours % 12; if (hours === 0) { hours = 12; } minutes = timer.getMinutes; seconds = timer.getSeconds; if($("#entry-"+JLAPI.mostRecentMessage.cid).hasClass('inline-alert')) { $("#entry-"+JLAPI.mostRecentMessage.cid).append(" "+hours+":"+padDigits(minutes,2)+":"+padDigits(seconds,2)+" "); } else { $("#entry-"+JLAPI.mostRecentMessage.cid+" > span.time").html(hours+":"+padDigits(minutes,2)+":"+padDigits(seconds,2)); }   } } function padDigits(number, digits) { return Array(Math.max(digits - String(number).length + 1, 0)).join(0) + number; }