MediaWiki:Common.js

importScriptPage('MediaWiki:Common.js/displayClock.js', 'admintools');

importScript('MediaWiki:Common.js/profileRedesign.js');

importScriptPage('InactiveUsers/code.js', 'dev');

/* Imports */ importArticles({   type: "script",    articles: [        // Back to top button        "w:c:dev:BackToTopButton/code.js",

] });

/* lock blog comments for blogs that haven't been commented on for more than 30 days. by: Joey Ahmadi

$(function {        if (wgNamespaceNumber == 500 && $('#article-comments-ul li').size > 1) {            var then = $('#article-comments-ul > .SpeechBubble:first .permalink').attr('href');            then = new String(then.match(/\d{8}/));            var monthnames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];            var year = then.match(/^\d{4}/);            var month = then.substring(4, 6);            var now = new Date;            month--;            month = monthnames[month];            var day = then.match(/\d{2}$/);            then = new Date(month + '' + day + ', ' + year);            var old = parseInt(now - then);            old = Math.floor(old / (1000 * 60 * 60 * 24));            if (old > 30) {                $('#article-comm-form').attr('disabled', 'disabled');                $('#article-comm').attr('disabled', 'disabled').text('This blog post hasn\'t been commented on for over 30 days. There is no need to comment.');               $('#article-comm-submit').attr('disabled', 'disabled');                $('.article-comm-reply .wikia-button .secondary').remove;            }        }    });

// *****************   // Collapsible stuff // *****************   /* */    var ShowHideConfig = { userLang: false, en: { show: "expand", hide: "hide", showAll: "expand all", hideAll: "hide all" }   };    importScriptPage('ShowHide/code.js', 'dev');

//Auto Change Status importScript('User:KATANAGOD/statusChanger2.js');

// Easy-add CVU importScript('User:Cbird2796/QCVUAdder.js');

// Account Navigation - Sandbox Link importScript('MediaWiki:Common.js/SandboxNav.js');

// Multiple Delete Script importScriptPage('AjaxBatchDelete/code.js', 'dev');

/* Replaces with the name of the user browsing the page. Requires copying Template:USERNAME. */

function UserNameReplace { if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return; $("span.insertusername").html(wgUserName); } addOnloadHook(UserNameReplace);

/* End of the replacement */

// ************************************************* // Pagetitle rewrite // // Rewrites the page's title, used by Template:Title // ************************************************* if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User talk") { $(function {    var newTitle = $("#title-meta").html;    if (!newTitle) return;    var edits = $("#user_masthead_since").text;    $(".firstHeading,#WikiaUserPagesHeader h1,#WikiaPageHeader h1").html(newTitle);    //$(".user_masthead_head h2").html(newTitle + "" + edits + " "); }); } /* */

importArticles({   type: "script",    articles: [        "w:c:dev:Countdown/code.js"    ] });