User:Elton/global.js
Appearance
(Redirected from User:Defender/global.js)
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
if (mw.config.get('wgCanonicalSpecialPageName') === 'CentralAuth' && mw.config.get('wgDBname') !== 'metawiki')
location.href = '//meta.wikimedia.org/wiki/Special:CentralAuth' + (mw.config.get('wgRelevantUserName') ? '?target=' + encodeURIComponent(mw.config.get('wgRelevantUserName')) : '');
$(document).ready(function() {
if ( mw.config.get('wgCanonicalSpecialPageName') !== 'Contributions' ) return;
var targ = mw.config.get('wgRelevantUserName') || document.querySelector('input[name="target"]').value.trim();
if ( !targ || !document.getElementById('contentSub') ) return;
var isIP = !(document.getElementById('t-userrights') || document.querySelector('.mw-userpage-userdoesnotexist'));
var isIPRange = isIP && !!~targ.lastIndexOf('/');
$('a[class="mw-contributions-link-abuse-log"]').after('<sup> <a href="/wiki/Special:Log?type=spamblacklist&user=' + encodeURIComponent(targ) + '" title="Spam blacklist">sBL</a> </sup>');
var links = new Array();
links.push('<a href="//login.wikimedia.org/wiki/Special:CheckUser/' + encodeURIComponent(targ) + '">LWCU</a>');
if (isIP) {
links.push('<a href="//meta.wikimedia.org/wiki/Special:GlobalBlock/'+targ+'">globally block</a>');
links.push('<a href="//whois-referral.toolforge.org/gateway.py?lookup=true&ip='+targ+'">WHOIS</a>');
if (!isIPRange) links.push('<a href="//whatismyipaddress.com/ip/'+targ+'">geolocate</a>');
links.push('<a href="//bullseye.toolforge.org/ip/'+targ+'">Bullseye</a>');
} else {
//links.push('<a href="//meta.wikimedia.org/wiki/Special:CentralAuth?target=' + encodeURIComponent(targ) + '">CentralAuth</a>');
if (mw.config.get('wgDBname') !== 'metawiki')
links.push('<a href="//meta.wikimedia.org/wiki/Special:Userrights/' + encodeURIComponent(targ + '@' + mw.config.get('wgDBname')) + '">user rights management</a>');
}
links.push('<a href="//xtools.wmflabs.org/globalcontribs/' + (isIPRange ? "ipr-" + targ : encodeURIComponent(targ)) + '">lookup contribs</a>');
links.push('<a href="//tools.wmflabs.org/meta/stalktoy/' + encodeURIComponent(targ) + '">stalktoy</a>');
var aTags = document.getElementById('contentSub').getElementsByTagName('a');
aTags[aTags.length-1].insertAdjacentHTML('afterend', ' | ' + links.join(' | '));
document.getElementById('contentSub').querySelector('.mw-changeslist-links').style.display = 'contents';
});
if (!~mw.config.get('wgUserGroups').indexOf('sysop')
&& ['enwiki','mediawikiwiki','ptwiki','simplewiki'].indexOf(mw.config.get('wgDBname')) === -1
&& !(["wikidatawiki","testwikidatawiki"].indexOf(mw.config.get('wgDBname')) !== -1 && mw.config.get('wgNamespaceNumber') === 0))
{
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/tagger.js&oldid=15459198&action=raw&ctype=text/javascript');
var otherSpeedy = {
'mediawikiwiki': 'speedy',
'enwikisource': 'sdelete',
'commonswiki': 'speedy delete',
'elwiktionary': 'γρήγορη διαγραφή',
};
var speedyTemplate = "delete";
if (mw.config.get('wgDBname') in otherSpeedy) {
speedyTemplate = otherSpeedy[mw.config.get('wgDBname')];
}
// <nowiki>
if(typeof(taggerConfig) == 'undefined') taggerConfig = {};
taggerConfig.tags = [];
taggerConfig.editSummary = [];
taggerConfig.tags[1] = '{{' + speedyTemplate + '|test}}';
taggerConfig.editSummary[taggerConfig.tags[1]] = 'delete';
taggerConfig.tags[2] = '{{' + speedyTemplate + '|nonsense}}';
taggerConfig.editSummary[taggerConfig.tags[2]] = 'delete';
taggerConfig.tags[3] = '{{' + speedyTemplate + '|no content}}';
taggerConfig.editSummary[taggerConfig.tags[3]] = 'delete';
taggerConfig.tags[4] = '{{' + speedyTemplate + '|no useful content}}';
taggerConfig.editSummary[taggerConfig.tags[4]] = 'delete';
taggerConfig.tags[5] = '{{' + speedyTemplate + '|vandalism}}';
taggerConfig.editSummary[taggerConfig.tags[5]] = 'delete';
taggerConfig.tags[6] = '{{' + speedyTemplate + '|blanked by the author}}';
taggerConfig.editSummary[taggerConfig.tags[6]] = 'delete';
taggerConfig.tags[7] = '{{' + speedyTemplate + '|out of project scope}}';
taggerConfig.editSummary[taggerConfig.tags[7]] = 'delete';
taggerConfig.tags[8] = '{{' + speedyTemplate + '|Spam/Cross-wiki spam}}';
taggerConfig.editSummary[taggerConfig.tags[8]] = 'delete';
taggerConfig.tags[9] = '{{' + speedyTemplate + '|not written in this project\'s language}}';
taggerConfig.editSummary[taggerConfig.tags[9]] = 'delete';
taggerConfig.tags[10] = '{{' + speedyTemplate + '|copyright violation}}';
taggerConfig.editSummary[taggerConfig.tags[10]] = 'delete';
taggerConfig.tags[11] = '{{' + speedyTemplate + '|local page of a Commons file}}';
taggerConfig.editSummary[taggerConfig.tags[11]] = 'delete';
taggerConfig.tags.other = 'This is used for the option you have to select to be able to insert a custom template';
// </nowiki>
}
if (!~mw.config.get('wgUserGroups').indexOf('sysop'))
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:WhitePhosphorus/js/GS_Rationale.js&oldid=25125133&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Elton/HideButtonsFromNonGsProjects.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Elton/QuickGlobalBlock.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:MarcoAurelio/stewardlinks.js&oldid=24761106&action=raw&ctype=text/javascript');
mw.loader.load( "//meta.wikimedia.org/wiki/User:AntiCompositeNumber/CentralAuthLWCULink.js?&oldid=27514435&action=raw&ctype=text/javascript" );
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:AntiCompositeNumber/CleanDeleteReasons.js&oldid=25184572&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Writ_Keeper/Scripts/massRollback.js&oldid=1196942814&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Writ_Keeper/Scripts/massRevdel.js&oldid=1166753295&action=raw&ctype=text/javascript');
//mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Glaisher/calcCIDR.js&oldid=15247853&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:L235/culoghelper-personaltesting.js&oldid=929488572&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:GeneralNotability/InvestorGoat.js&oldid=1110682461&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/copy-section-link.js&oldid=1231931204&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups');
// MoreMenu
//if (mw.loader.getState('ext.gadget.MoreMenu') === null) {
mw.loader.load('//meta.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:MoreMenu.import.js');
/*} else {
mw.loader.load('ext.gadget.MoreMenu');
}*/
/*******************
** On specific wikis
*******************/
switch(mw.config.get('wgDBname')) {
case 'metawiki':
// SBHandler parameters
// <nowiki>
window.SBHandlerAddComment = ':{{Added}} to [[Spam blacklist]] — ~~'+'~~';
window.SBHandlerRemComment = ':{{Removed}} — ~~'+'~~';
window.SBHandlerRevComment = ':{{Reverted}} — ~~'+'~~';
window.SBHandlerDecComment = ':{{Declined}} — ~~'+'~~';
window.SBHandlerCloseComment = ':{{Closing}} — ~~'+'~~';
// </nowiki>
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:DannyS712/SRG.js&oldid=25427007&action=raw&ctype=text/javascript');
}