User:Dai ca superman/global.js

var QuickToolsAdvancedtop = false;

window.cacheSkip = []; window.cacheSkipLimit = 1000; window.topLevelCat = '';

massRenameDelay = 1000; massRenameSummary = 'automatic'; var QuickContribs = { expiry : '3 days', reason : 'Vandalism' };

/** * Configure my list of global.js articles * Grab the list from sessionStorage if available * This allows me to easily turn on/off individual scripts * from the browser console for testing purposes */

mw.loader.using(['mediawiki.util', 'ext.fandom.ContentReview.legacyLoaders.js'], function {   importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:NoImageLightbox/code.js', 'u:dev:MediaWiki:Wikimarks/code.js', 'u:dev:MediaWiki:ManageReferences/code.js', ]   }); });

var usergroups = mw.config.get('wgUserGroups').join(' '), page = mw.config.get('wgPageName'), specialpage = mw.config.get('wgCanonicalSpecialPageName'), title = mw.config.get('wgTitle'), action = mw.config.get('wgAction'), sitename = mw.config.get('wgSiteName'), href, link; /* IP lookup on contribs */ if (specialpage === "Contributions" && title.split('.').length == 4) { href = 'http://myip.ms/info/whois/' + page.split('/')[1], link = ' (lookup)'; $('.masthead-info').find('h2').html(link); } /* Create an edit link on Special:MovePage for easy redirecting */ if (specialpage === "Movepage") { href = $('fieldset').find('a').attr('href') + '?action=edit', link = ' (edit)'; $('#mw-movepage-table').find('a').first.after(link); } /* Unchecks redirects when moving files */ if (page.indexOf("Special:MovePage/File:") !== -1) $('#wpLeaveRedirect').removeAttr('checked'); /* Show abuse log entries in Special:Log/newusers */ if ("Special:Log/newusers".indexOf(page) !== -1) { $('li.mw-logline-newusers').each(function {   href = '/wiki/Special:AbuseLog?wpSearchUser=' + $(this).children('a.new.mw-userlink,a.mw-userlink').attr('href').substring(11),    link = ' | abuse';    $(this).children('span.mw-usertoollinks').find('a:last-child').after(link);  }); }
 * (function($, mw) {

/* History button for diffs */ /* (doesn't work on some namespaces like User: and User talk: */ /*   because w:Special:MyPage/global.js and Special:MyPage/wikia.js */ /*   never get loaded) */ $(function {	$("h1:contains('Changes:')").after('History '); }) /* Create move link on Special:ListFiles for users' files listed */ if (specialpage === "ListFiles") { $('td.TablePager_col_img_name').each(function {   link = ' (move)';     $(this).append(link);  }); } /* Automatic broken redirect delete summary */ if (action === "delete" && $('#wpReason').val.slice(0,23) === 'content was: \"#REDIRECT' ) $('#wpReason').val('Broken redirect'); /* Revision delete */ if (action === 'revisiondelete' || specialpage === 'Revisiondelete') {  $('#wpHidePrimary,#wpHideComment,#wpHideUser').attr('checked','checked');  $('#wpReason').val('spam'); } }) (this.jQuery, this.mediaWiki);

/* var specialpages = [ "Special:BrokenRedirects", "Special:DoubleRedirects", "Special:DeadendPages", "Special:BrokenRedirects", "Special:LonelyPages", "Special:UnusedFiles", "Special:UnusedTemplates" ]; if (specialpages.indexOf(mw.config.get('wgPageName')) !== -1) { $('#WikiaArticle').prepend(' '); if ("Special:UnusedFiles".indexOf(wgPageName) !== -1) { $('div.thumb img').each(function {       $('#output-box').append('File:'+$(this).attr('data-image-name')+'\n')}); } else { $('ol.special').find('li').each(function {       var text = $(this).find('a').first.text;        document.getElementById('output-box').value += text + '\n';}); } }
 * Display a list of text for certain special pages
 * Written by Shining-Armor
 * Added support for Special:UnusedFiles by Ozuzanna

/* Add quick link to IP location lookup for anon contributors */ if (mw.config.get("wgCanonicalSpecialPageName") === "Contributions" && ($('a:contains("Why create an account?")').length == 1)) { $('.masthead-info').find('h2').html(" (Lookup)"); }

// LookupUser: contribs -> listfiles $(function {	if (mw.config.get("wgCanonicalSpecialPageName") === "LookupUser") {		$("span#lu-tools").append(" | ").append("ListFiles-ify contribs");		$("a#lu-tools-listfilesify").click(function(event) { event.preventDefault; var user = $("span#lu-tools").siblings("a").text; $("div#lookupuser-table_wrapper table#lookupuser-table tr td a[href$='Special:Contributions/" + user + "']").each(function(index, element) {				element.href = element.href.replace("Special:Contributions", "Special:ListFiles");				element.innerHTML = "ListFiles";			}); });               if (mw.user.options.get("language") === "it") {                        var email = $("a[href*='Special:EmailUser']").text;                        $("a[href*='Special:EmailUser']").after(" pi&ugrave;</a>");                }	} });

// User:Advieser // disable redirect links $('.mw-redirect, .allpagesredirect > a').each(function {  var link = new mw.Uri(this.href);  link.extend({ redirect: 'no' }); $(this).attr('href', link.toString); }); mw.loader.using(['mediawiki.util', 'ext.fandom.ContentReview.legacyLoaders.js'], function {           if (mw.config.get('wgCityId') !== '598369') {                window.popupOnEditSelection = false;                window.popupStructure = 'menus';                window.popupAdminLinks = true;                window.popupDelay = 0.5;                window.popupImageSize = 150;                window.popupImageSizeLarge = 150;                mw.loader.load('https://vi.wikipedia.org/w/index.php?title=Thành_viên:Vinhtantran/strings-vi.js&action=raw&ctype=text/javascript');                mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript');                mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-navpop.css&action=raw&ctype=text/css', 'text/css');

$(window).load(function {                   importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:Nuke/code.js', 'u:dev:MediaWiki:WHAM/code.js', 'u:dev:MediaWiki:WHAM/code.2.js' ]                   });                });

window.ajaxPages = ["Special:NewPages", "Special:ListFiles"]; window.ajaxSpecialPages = ["Recentchanges", "WikiActivity", "Watchlist", "Log", "Images", "Contributions"]; window.AjaxRCRefreshText = "Auto-refresh"; window.AjaxRCRefreshHoverText = "Tự động làm mới trang";

importArticles({                   type: 'script',                    articles: [                        'u:dev:MediaWiki:ListFiles/code.js',                        'u:dev:MediaWiki:QuickDiff/code.js',                        'u:dev:MediaWiki:CatNav/code.js',                        'u:dcsuper:User:Dai_ca_superman/CatNav.javascript',                        'u:dev:MediaWiki:PortableCSSPad/code.js',                        'u:dev:MediaWiki:QuickToolsv2/code.js',                        'u:dev:MediaWiki:AjaxRC/code.js',                        'u:dev:MediaWiki:MassProtect/code.js',                        'u:dev:MediaWiki:LastEdited/code.js',                        'u:dev:MediaWiki:NullEditButton/code.js',                        'u:dev:MediaWiki:MassNullEdit/code.js',                        'u:dev:MediaWiki:AutoEditPages/code.js',                        'u:dev:MediaWiki:HideRail/code.js', 'u:dev:MediaWiki:CacheCheck/code.js', 'u:dev:MediaWiki:AjaxBatchDelete/code.2.js', 'u:dev:MediaWiki:AjaxBatchUndelete/code.js', 'u:dev:MediaWiki:MassRename/code.js', 'u:dev:MediaWiki:QuickContribs/code.js', 'u:dev:MediaWiki:AjaxRename/code.js', 'u:dev:MediaWiki:ContribRC/code.js', 'u:dev:MediaWiki:PurgeButton/code.js', 'u:dev:MediaWiki:MassRenameRevert/code.js', 'u:dev:MediaWiki:RevealAnonIP/usercode.js', 'u:dev:MediaWiki:PageRenameAuto-update/code.js', 'u:dev:MediaWiki:MassCategorization/code.js', 'u:dev:MediaWiki:FileUsageAuto-update/code.js', 'u:dev:MediaWiki:CategoryRenameAuto-update/code.js', 'u:dev:MediaWiki:RedirectManagement/code.js', 'u:dev:MediaWiki:MassBlock/code.js', 'u:dev:MediaWiki:CategoryRenameAuto-update/code.js', 'u:dcsuper:User:Dai_ca_superman/GlobalScripts.javascript', 'u:dcsuper:User:Dai_ca_superman/Skin_Switch_Button.javascript' ]               });            } });