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

/* Standard Edit Summaries: default reasons */ window.dev = window.dev || {}; if(mw.config.get('wgContentLanguage') === 'en') { window.dev.editSummaries = { select: [ 'Standard Edit Summaries', '1.Interwiki', [ 'Interwiki', 'Updated interwiki link', 'Fixed interwiki link' ],           '2.CVN thing', [ 'Removed vandalism', 'Removed spam', 'Improved the previous revision' ],           '3.Translation', [ 'Started the translation', 'Added the translation', 'Finished the translation', 'Fixed the translation' ],       ]    }; } else if (mw.config.get('wgCityId') === "1435801") { window.dev.editSummaries = { select: [ 'Standard Edit Summaries', '1.Translation', [ 'Started the translation', 'Added the translation', 'Finished the translation', 'Fixed the translation' ],           '2.Updating Interwiki', [ 'Updated Czech links', 'Updated German links', 'Updated Spanish links', 'Updated Finnish links', 'Updated French links', 'Updated Italian links', 'Updated Japanese links', 'Updated Polish links', 'Updated Portuguese links', 'Updated Russian links', 'Updated Turkish links', 'Updated Ukrainian links', 'Updated Chinese links' ],       ]    }; } else if(mw.config.get('wgContentLanguage') === 'ru') { window.dev.editSummaries = { select: [ 'Standard Edit Summaries', '1.Интервики', [ 'Интервики', 'Обновление интервики', 'Исправление ссылки интервики', ],           '2.Контрвандализм', [ 'Удаление вандализма', 'Удаление спама', 'Улучшение предыдущей правки' ],           '3.Перевод', [ 'Начало перевода', 'Добавление перевода', 'Окончание перевода', 'Исправление перевода' ],       ]    }; } else if (mw.config.get('wgContentLanguage') === 'de') { window.dev.editSummaries = { select: [ 'Standard Edit Summaries', '1.Interwiki', [ 'Interwiki', 'Updated interwiki link', 'Fixed interwiki link' ],           '2.CVN thing', [ 'Removed vandalism', 'Removed spam', 'Improved the previous revision' ],       ]    }; } else if (mw.config.get('wgContentLanguage') === 'fr') { window.dev.editSummaries = { select: [ 'Standard Edit Summaries', '1.Interwiki', [ 'Interwiki', 'Updated interwiki link', 'Fixed interwiki link' ],           '2.CVN thing', [ 'Removed vandalism', 'Removed spam', 'Improved the previous revision' ],       ]    }; } else if(mw.config.get('wgContentLanguage') === 'uk') { window.dev.editSummaries = { select: [ 'Standard Edit Summaries', '1.Интервики', [ 'Interwiki', 'Updated interwiki link', 'Fixed interwiki link' ],           '2.CVN thing', [ 'Removed vandalism', 'Removed spam', 'Improved the previous revision' ],       ]    }; } else { window.dev.editSummaries = { select: [ 'Standard Edit Summaries', '1.Interwiki', [ 'Interwiki', 'Updated interwiki link', 'Fixed interwiki link' ],           '2.CVN thing', [ 'Removed vandalism', 'Removed spam', 'Improved the previous revision' ],       ]    }; }

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

/* 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:kocka:User:KockaAdmiralac/UnhideUserWikis.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'    ] });