User:Lience/global.js

// Spoiler alerts // $(function{ localStorage.setItem("SiderailSpoilerWarningRead", "no"); });

// Scripts // $(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("");    /**     * 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",        "RC": "Special:RecentChanges?hideminor=0",        "Sandbox": (mw.config.get('wgCityId') === "1289615" ? "" : "w:c:ru.undertale:") + "User:Mamvik/Блокнотик",       "Dashboard": (mw.config.get('wgCityId') === "1289615" ? "" : "w:c:ru.undertale:") + "Special:AdminDashboard",       "Colors": (mw.config.get('wgCityId') === "1289615" ? "" : "w:c:ru.undertale:") + "MediaWiki:ColorMessages.css",       "Chat JS": (mw.config.get('wgCityId') === "1289615" ? "" : "w:c:ru.undertale:") + "MediaWiki:Chat.js",       "Wikia CSS": (mw.config.get('wgCityId') === "1289615" ? "" : "w:c:ru.undertale:") + "MediaWiki:Wikia.css",       "Global JS": (mw.config.get('wgCityId') === "177" ? "" : "w:") + "Special:Mypage/global.js",        "Global CSS": (mw.config.get('wgCityId') === "177" ? "" : "w:") + "Special:Mypage/global.css",   }, linksContent = "";    for(var prop in globalLinks) linksContent += "" + prop + "";    $(".notifications-container").first.before(' ' + linksContent + ' '); });

/* Import some shit */ importArticles({ type: 'script', articles: [   'w:c:dev:MediaWiki:ChatHacks.js' ]});

/* and some useful stuff */ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:WHAM/code.2.js',        'u:kocka:MediaWiki:AjaxThreadDelete/code.js',    ] });