User:StarmanW/global.js

// Monchoman45's chathacks importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

// Always show bots--Full Credits goes to Dorumin $('a').each(function {  if ( $(this).attr('href') == '/wiki/Special:RecentChanges' ) {      $(this).attr('href', '/wiki/Special:RecentChanges?hidebots=0');   } }); // Remove MPC--Full Credits goes to Dorumin if ( $(".youtubeplayer").length ) { $('ul.tools li:first-child:not(.tools-menu li)').after('Remove MPC'); $(".removeMPC").click(function {       $(".youtubeplayer").remove;        $(".removeMPC").remove;    }); } // Quick Access to EditCount--Full Credits goes to Dorumin if ( $('.tally').length ) { var $tally = $('.tally'); $tally.attr('title', 'EditCount'); $tally.click(function {       window.location.href = wgServer + '/wiki/Special:EditCount/' + $('h1[itemprop="name"]').text;    }); }

// AjaxRC window.ajaxPages = ["Blog:Recent_posts","Special:Chat","Special:WikiActivity","Spezial:Letzte_Änderungen","Especial:CambiosRecientes","Specjalna:Ostatnie_zmiany","Special:Senaste_ändringar","Spécial:Modifications_récentes","Speciális:Friss_változtatások","Speciale:UltimeModifiche","Especial:Mudanças_recentes","特別:最近の更新","Toiminnot:Tuoreet_muutokset","Special:最近更改","Özel:SonDeğişiklikler","Speciaal:RecenteWijzigingen","Đặc_biệt:Thay_đổi_gần_đây","Special:RecentChanges","Special:Watchlist","Special:Log","Special:Log/newusers","Special:Log/useravatar","Special:Images","Special:Log/upload","특수기능:최근바뀜","Служебная:RecentChanges"]; window.ajaxIndicator = 'http://vignette2.wikia.nocookie.net/dev/images/8/82/Facebook_throbber.gif'; window.ajaxRefresh = 20000; window.AjaxRCRefreshText = 'Auto-refresh'; window.AjaxRCRefreshHoverText = 'Automatically refresh the page';

// WHAM WHAMBotMe = true; WHAMBotReason = "Cleanup"; WHAMDelay = 100;

//Fast Delete var fdButtons = []; fdButtons[fdButtons.length] = {'summary': 'spam','label': 'S'}; fdButtons[fdButtons.length] = {'summary': 'vandalism','label': 'V'}; fdButtons[fdButtons.length] = {'summary': 'Housekeeping','label': 'HK'}; fdButtons[fdButtons.length] = {'summary': 'Cleanup','label': 'C'}; fdButtons[fdButtons.length] = {'summary': 'Unused','label': 'U'}; fdButtons[fdButtons.length] = {'summary': 'Unofficial/Not-Needed/Irrelevant','label': 'UNI'}; fdButtons[fdButtons.length] = {'summary': 'Other reason','label': 'Other'}; // MassCategorization massCategorizationDelay = 1000;

// Quick Userpage var qtEnableUserPageOverwrite = true; var qtUserPageTemplate = '';

//Other $('Global.js').insertAfter('.AccountNavigation .subnav li:first');

// Stuff--Full Credits goes to Dorumin baee :) (function {var original = document.title;if (typeof blinkInterval === 'undefined') {window.blinkInterval = 1000;}var timeout;window.blinkTitle = function(newMsg) {function step {document.title = (document.title == original) ? newMsg : original;timeout = setTimeout(step, blinkInterval);}cancelBlinkTitle(timeout);step;};window.cancelBlinkTitle = function {clearTimeout(timeout);document.title = original;};}); $(window).focus(function { cancelBlinkTitle; }); $(window).load(function { if ( wgPageName == 'User:StarmanW/RC_Wikis' && wgAction == 'view' ) { Notification.requestPermission; window.onbeforeunload = function(e) { return 'Man you must be out of your mind!'; };       $('#WikiaPageHeader, #WikiHeader').remove; $('.rcm-options legend').click(function{           $('.rcm-options').remove;        }); importScriptPage('MediaWiki:Novasis14/code.js', 'dev'); $('#globalNavigation').toggleClass('global-navigation').addClass('hidden'); $('.WikiaSiteWrapper').css('padding-top', '0'); mw.util.addCSS('#globalNavigation.inverse #novasis-label { background: #fff !important; } #novasis-label { position: fixed !important; top: 0 !important; } .global-navigation-container { display: none; } .novasis-navbar-forced .global-navigation-container { display: block !important; }'); var target = document.querySelector('#globalNavigation'), lngth = $('.novasis-navbar-forced').length; var observer = new MutationObserver(function(mutations) {           mutations.forEach(function(mutation) { if ($('.novasis-navbar-forced').length > lngth) { lngth = $('.novasis-navbar-forced').length; $('#globalNavigation').addClass('global-navigation'); $('#novasis-label').attr('style', 'top: 46px !important;'); }               else if ($('.novasis-navbar-forced').length < lngth) { lngth = $('.novasis-navbar-forced').length; $('#globalNavigation').removeClass('global-navigation'); $('#novasis-label').attr('style', 'top: 0 !important;'); }           });        });        var config = { attributes: true, childList: false, characterData: true };       observer.observe(target, config); setInterval(function{           if ( $('.modalToolbar:not(.old)').length ) { // Rollback                $('.modalToolbar').addClass('old');                var ttl = $('#rcm-diff-viewer h1').text;                ttl = ttl.substring(0, ttl.length - 14);                $.getJSON('/api.php?action=query&prop=revisions&rvtoken=rollback&titles=' + ttl + '&format=json', function(data2) { var code = JSON.stringify(data2); Usrnm = code.substring( code.lastIndexOf(',"user":"') + 9,code.lastIndexOf('","timestamp":') ).replace(/\s/g, '+'); RBTokn = encodeURI( code.substring( code.lastIndexOf('"rollbacktoken":') + 17,code.lastIndexOf('\\"}]}}}}') ) ).replace('+', '%2B');                   $('.modalToolbar a').first.before('Rollback');                });            } // End of Rollback            if ( $('.rcm-previouslyLoaded:not(.old)').length ) {                $('.rcm-previouslyLoaded').addClass('old');                if (!document.hasFocus) {                    blinkTitle('New edits!');                    // Display desktop notification.                    var notification = new Notification("New edits!");                }            }            if(document.querySelector(this.modID+" .rcm-autoRefresh-checkbox").checked) {                if ( $('.rcm-noNewChanges:not(.old)').length ) { $('.rcm-rcm-noNewChanges').addClass('old'); setTimeout(function{                       if (!document.hasFocus) {                            $('.rcm-status button').click;                        }                    }, 15000); }           }        }, 3000);    } });

//Javascripts importArticles({   type: "script",    articles: [        "u:starmanw:QuickLogs/code.js",        "u:starmanw:MultiUpload/code.js",        "u:kocka:MediaWiki:AjaxCommentDelete/code.js",        "u:dev:AjaxDiff/code.js",        "u:dev:CleanWantedFiles/code.js",        "u:dev:RevealAnonIP/code.js",        "u:dev:ChatTimestamps/code.js",        "u:dev:AnchoredRollback/code.js",        "u:dev:AjaxUndo/code.js",        "u:dev:MassRenameRevert/code.js",        "u:dev:AjaxRedirect/code.js",        "u:dev:LastEdited/code.js",        "u:dev:AjaxRC/code.js",        "u:dev:NullEditButton/code.js",        "u:dev:QuickCreateUserPage/code.js",        "u:dev:BackToTopButton/code.js",        "u:dev:DisplayTimer/code.js",        "u:dev:FastDelete/code.js",        "u:dev:MediaWiki:AjaxBatchDelete/code.js",        "u:dev:MediaWiki:Nuke/code.js",        "u:dev:MediaWiki:RedirectManagement/code.js",        "u:dev:MediaWiki:PrivateMessageAlert/code.js", "u:dev:MediaWiki:Standard_Edit_Summary/code.js", "u:dev:MediaWiki:RecentChangesMultiple/code.2.js", "u:dev:MediaWiki:CategoryRenameAuto-update/code.js", "u:dev:MediaWiki:AutoEditDropdown/code.js", "u:dev:MediaWiki:Rollback/code.js", "u:dev:MediaWiki:ContribsLink/code.js", "u:dev:MediaWiki:FindAndReplace/code.js", "u:dev:MediaWiki:ChatBlockButton/code.2.js", "u:dev:MediaWiki:MassCategorization/code.js", "u:dev:MediaWiki:ViewRemoved/code.js", "u:dev:MediaWiki:WHAM/code.2.js", "u:dev:MediaWiki:ChatBlockButton/code.2.js", "u:dev:MediaWiki:MultipleFileDelete/code.js", ] });