User:Lience/global.js

/* GlobalNavModifications */ window.globalLinks = { global: { "User": "User:Mamvik", "Talk": "User talk:Mamvik", "Contribs": "Special:Contributions/Mamvik", "RC": "Special:RecentChanges?hidebots=0&hideminor=0", "Themes": "MediaWiki:Themes.css", "Wikia": "MediaWiki:Wikia.css", "Common": "MediaWiki:Common.css", "Global JS": "w:User:Mamvik/global.js", "Global CSS": "w:User:Mamvik/global.css", },   community: { "Global JS": "User:Mamvik/global.js", "Global CSS": "User:Mamvik/global.css" } };

/* AjaxDelete: all reasons */ if(mw.config.get('wgContentLanguage') === 'ru') { window.AjaxDelete = { deleteReasons: { 'Справка:Вандализм': 'Вандализм', 'Справка:Спам': 'Спам', 'Дубликат файла': 'Дубликат файла', 'По просьбе автора': 'По просьбе автора', 'Неинформативный контент': 'Неинформативный контент', 'Нарушение правил': 'Нарушение правил' },   }; } else { window.AjaxDelete = { deleteReasons: { 'Help:Vandalism': 'Vandalism', 'Help:Spam': 'Spam' },   }; } $(function {    window.AjaxDelete.autoCheckWatch = false;    window.AjaxDelete.noUndelete = true; });

/* Automatically creating my user page and greeting */ if(mw.config.get('wgContentLanguage') === 'ru') { window.AutoCreateUserPagesConfig = { content: { 2: ,           3: ,            1202: ''        },        summary: 'Автоматическое создание страницы участника' }; } else { window.AutoCreateUserPagesConfig = { content: { 2: ,           3: ,            1202: ''        },        summary: 'Auto creating user page' }; }

/* Remove MassProtect later */ massProtectDelay = 1000;

/* Imports */ importArticles({   type: 'script',    articles: [        'u:kocka:User:KockaAdmiralac/GlobalNavModifications.javascript',        'u:botcentral:User:Ditto_Creeper_Bot/FixedRollback.javascript',        'u:kocka:User:KockaAdmiralac/AutoCreateUserPages.javascript',        'u:ru.mamvik:User:Mamvik/Signature.javascript',        'u:dev:MediaWiki:UnhideUserMasthead/code.js',        'u:ru.mamvik:User:Mamvik/Import.javascript',        'u:dev:MediaWiki:Standard_Edit_Summary/code.js',        'u:kocka:MediaWiki:VSTFReport/code.js',        'u:dev:MediaWiki:AjaxDelete/code.js',        'u:dev:MediaWiki:QuickDiff/code.js',        'u:dev:NullEditButton/code.js',        'u:dev:MassProtect/code.js'    ] });

/* done by me. Replacing NullEditButton to whatever I want >:3 */ $(function {   function nulltext {        var nulledit = "Null Edit";        $('#ca-null-edit').text(nulledit);    }    setTimeout(nulltext, 1000); });

/* "You shall not pass!" */ (function {   var img;    if (wgUserLanguage == 'ru') img = 'http://i.imgur.com/HiMVnYC.png';    else img = 'http://i.imgur.com/JtmgNUu.png';    $('.permissions-errors').html('');     if ($('.editpage-intro-wrapper').length) $('img[src="' + img + '"]').width('122px'); });

/* Removing FANDOM Logo when I'm on phone. Made by Ditto Creeper Bot <3 */ $(function {   $.browser.device = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase));    if ($.browser.device === true) {        var setter = setInterval(safernavigation__logo, 1000);        function safernavigation__logo {            if ($('.wds-global-navigation__logo')[0] !== undefined) {                $('.wds-global-navigation__logo').remove            } else {                return clearInterval(setter);            }        }    } })