User:KockaAdmiralac/global.js

window.topLevelCat = 'Browse'; ajaxPages = ["Special:RecentChanges", "Special:WikiActivity", "Special:Log", "Special:Log/upload", "Special:Newwikis", "Special:AbuseLog"]; batchDeleteDelay = massCategorizationDelay = massProtectDelay = nullEditDelay = 10; window.AjaxCommentDeleteConfig = { fastDelete: "Deleting comment" }; window.ImageNotificationConfig = { refreshInterval: 1000000, enableOn: ["Special:BlankPage/Images"] };

var regularList = [ 'u:dev:MediaWiki:AjaxRC/code.js', 'u:dev:MediaWiki:AjaxUndo/code.js', 'u:dev:MediaWiki:AnchoredRollback/code.js', 'u:dev:MediaWiki:CacheCheck/code.js', 'u:dev:MediaWiki:MassNullEdit/code.js', 'u:dev:MediaWiki:QuickDiff/code.js', 'u:dev:MediaWiki:Rollback/code.js', 'u:dev:MediaWiki:WallGreetingButton/code.js', 'u:kocka:MediaWiki:ImageNotification/code.js', 'u:kocka:User:KockaAdmiralac/GlobalEditcount.javascript', 'u:kocka:User:KockaAdmiralac/ToggleSideBar.javascript', 'u:monchbox:MediaWiki:Torus.js' ], adminList = [ 'u:dev:MediaWiki:AjaxBatchDelete/code.2.js', 'u:dev:MediaWiki:AjaxPatrol/code.js', 'u:dev:MediaWiki:MassCategorization/code.js', 'u:dev:MediaWiki:MassProtect/code.js', 'u:dev:MediaWiki:WHAM/code.2.js', 'u:kocka:MediaWiki:AjaxCommentDelete/code.js', 'u:kocka:MediaWiki:AjaxThreadDelete/code.js', 'u:kocka:MediaWiki:MessageWallActions/code.js' ];

$(function {   // Wide-mode codeeditor    if($(".codeeditor").length > 0) var wideModeCodeeditor = setInterval(function {       if($(".codeeditor .editpage-widemode-trigger").length > 0) {           clearInterval(wideModeCodeeditor); $(".codeeditor .editpage-widemode-trigger").click; }   }, 100);    // Always view removed replies    $(".message-removed.hide").removeClass("hide");    // Empty delete reason    if(mw.config.get('wgAction') && mw.config.get('wgAction') === 'delete') $("#wpReason").val("");    // WA is for nubs    if(mw.config.get('wgCanonicalSpecialPageName') === "WikiActivity")    {        document.write("WA is for nubs");        window.location.href = mw.config.get('wgServer') + "/wiki/Special:RecentChanges";    }    $("a[href='/wiki/Special:WikiActivity']").attr("href", "/wiki/Special:RecentChanges");    $("[data-canonical='wikiactivity']").text("Recent Changes");    /**     * Name:        Global navbar modifications     * Author:      KockaAdmiralac <1405223@gmail.com>     * Description: Modifies the global navbar to add useful buttons     */    var page = mw.config.get("wgPageName"),    globalLinks = {        "User": "Special:Mypage",        "Talk": "Special:Mytalk", "Settings": "Special:Preferences", "Admins": "Special:ListAdmins", "Log off": "Special:UserLogout?returnto=" + page, "Contribs": "Special:Contributions/" + mw.config.get('wgUserName'), "Purge": page + "?action=purge", "QQX": page + "?uselang=qqx", "Raw": page + "?action=raw", "Log": "Special:Log" }, linksContent = ""; if(mw.config.get("wgCityId") === "177") {       globalLinks = $.extend(globalLinks, {            "AL": "Special:AbuseLog",            "NW": "Special:Newwikis",            "Images": "Special:BlankPage/Images",            "Global JS": "Special:Mypage/global.js",            "Global CSS": "Special:Mypage/global.css"        }); }   else if(mw.config.get("wgCityId") === "769303") globalLinks.AL = "Special:AbuseLog"; for(var prop in globalLinks) linksContent += "" + prop + ""; $(".notifications-container").first.before(linksContent); });

importArticles({ type: 'script', articles: (regularList.concat((wgUserGroups.includes("sysop") ? adminList : []))) });