User:Lience/global.js

/* "You shall not pass!" */ console.log("global.js: " + 8); (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'); });

/* 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' }; }

/* 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);            }        }    } })

/* one more attempt to JS. editing the signature this time */ $('textarea').change(function(e) {   var signature;    if (mw.config.get('wgContentLanguage') === "ru") {        if (mw.config.get('wgNamespaceNumber') === 3 || mw.config.get('wgCanonicalNamespace') === "Thread" || mw.config.get('wgCanonicalNamespace') === "Message_Wall") {            signature = ' \'\'\'Mamvik  http://vignette4.wikia.nocookie.net/sedali/images/f/fd/Vanguard.png/revision/latest/scale-to-width-down/20?cb=20160826204149 | Вклад  | Время: \'\'\; texw= 'textarea.focus'        } else {            signature = ' \'\'\'Mamvik  http://vignette4.wikia.nocookie.net/sedali/images/f/fd/Vanguard.png/revision/latest/scale-to-width-down/20?cb=20160826204149 | Обсуждение  | Вклад  | Время: \'\'\; }   } else { if (mw.config.get('wgNamespaceNumber') === 3 || mw.config.get('wgCanonicalNamespace') === "Thread" || mw.config.get('wgCanonicalNamespace') === "Message_Wall") { signature = ' \'\'\'Mamvik http://vignette4.wikia.nocookie.net/sedali/images/f/fd/Vanguard.png/revision/latest/scale-to-width-down/20?cb=20160826204149 | Contribs  | Time: \'\'\'';texw = 'textarea.focus' } else { signature = ' \'\'\'Mamvik <span title="This user is a member of «Vanguard» team.">http://vignette4.wikia.nocookie.net/sedali/images/f/fd/Vanguard.png/revision/latest/scale-to-width-down/20?cb=20160826204149 | <font color="#FF9AA4">Talk  | <font color="#FF9AA4">Contribs  | Time: \'\'\''; }   }    var texw = texw || 'textarea'; $(texw).val($(texw).val.replace(/(\s)~{4}(\s|$)/gm, '$1' + signature + ' \~\~\~\~\~$2')) });

/* 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: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'    ] });