Jump to content

User:Zippybonzo/common.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// Enable caching for resource loads, see [[User:SD0001/Making_user_scripts_load_faster]], @revision 6
if(!/\bnocache=\b/.test(location.href)){let e=(e,t,n)=>(e=e.replace(/special:mypage/i,"User:"+mw.config.get("wgUserName")),$.get("https://"+t+"/w/api.php?titles="+e+"&origin=*&format=json&formatversion=2&uselang=content&maxage=86400&smaxage=86400&action=query&prop=revisions|info&rvprop=content&rvlimit=1").then((r=>{let o=r.query.pages[0];if(o.missing)return;let a=o.revisions[0].content;if(n&&"text/javascript"!==n||"javascript"!==o.contentmodel){if("text/css"!==n||"css"!==o.contentmodel)return $.Deferred().reject('Refused to load "'+e+'"@'+t+": content type mismatch");mw.loader.addStyleTag(a)}else{let e=document.createElement("script");e.innerHTML=a,document.head.appendChild(e)}}))),t=e=>{let t=/^(?:(?:https:)?\/\/(.*))?\/w\/index.php/.exec(e),n=/\btitle=([^=?&]*)/.exec(e);return t&&n&&/\baction=raw\b/.test(e)&&/\bctype=/.test(e)?[n[1],t[1]||mw.config.get("wgServerName")]:null};window.importScript=t=>{e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/javascript")},window.importStyleSheet=t=>{e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/css")};let n=mw.loader.load;mw.loader.load=function(r,o){let a=t(r);a?e(a[0],a[1],o):n.apply(mw.loader,[...arguments])};let r=mw.loader.getScript;mw.loader.getScript=function(n){let o=t(n);return o?e(o[0],o[1],"text/javascript"):r.apply(mw.loader,[...arguments])}}

switch ( mw.config.get( 'wgNamespaceNumber') ) {
		case -1: //Special
			importScript('User:DannyS712/Pretty rights log.js'); // Backlink: [[User:DannyS712/Pretty rights log.js]]
			importScript('User:Novem Linguae/Scripts/NotSoFast.js'); // Backlink: [[User:Novem Linguae/Scripts/NotSoFast.js]]
			importScript('User:Suffusion of Yellow/FilterDebugger.js'); // Backlink: [[User:Suffusion of Yellow/FilterDebugger.js]]
			importScript('User:Suffusion of Yellow/filterDiff.js'); // Backlink: [[User:Suffusion of Yellow/filterDiff.js]]
			importScript('User:Novem Linguae/Scripts/UserRightsDiff.js'); // Backlink: [[User:Novem Linguae/Scripts/UserRightsDiff.js]]
			importScript("User:Ocaasi/WikiLoveinstallscript.js");// Adds Teahouse Badges to WikiLove
			break;
		case 0: // Main
			importScript('User:DannyS712/copyvio-check.js'); // Backlink: [[User:DannyS712/
			mw.loader.load( '/w/index.php?title=User:Evad37/MoveToDraft.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/MoveToDraft.js]]
			importScript('User:Headbomb/unreliable.js'); // Backlink: [[User:Headbomb/unreliable.js]]
			importScript('User:SuperHamster/CiteUnseen.js'); // Backlink: [[User:SuperHamster/CiteUnseen.js]]
			importScript('User:Awesome Aasim/xfdvote.js'); // Backlink: [[User:Awesome Aasim/xfdvote.js]]
			importScript('User:Novem Linguae/Scripts/DetectSNG.js'); // Backlink: [[User:Novem Linguae/Scripts/DetectSNG.js]]
			importScript('User:MPGuy2824/MoveToDraft.js'); // Backlink: [[User:MPGuy2824/MoveToDraft.js]]
			importScript('User:Novem Linguae/Scripts/DetectPromo.js'); // Backlink: [[User:Novem Linguae/Scripts/DetectPromo.js]]
			importScript('User:Chlod/Scripts/Deputy.js'); // Backlink: [[User:Chlod/Scripts/Deputy.js]]
			importScript('User:Tol/VECN.js'); // Backlink: [[User:Tol/VECN.js]]
			importScript('User:Chlod/Scripts/InfringementAssistant.js'); // Backlink: [[User:Chlod/Scripts/InfringementAssistant.js]]
			mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/rater.js]]
			importScript('User:Phlsph7/Readability.js'); // Backlink: [[User:Phlsph7/Readability.js]]
			mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );
			break;
		case 1: // Talk
			importScript('User:Ais523/votesymbols.js'); // Backlink: [[User:Ais523/votesymbols.js]]
			importScript('User:Terasail/Edit_Request_Tool.js'); // Backlink: [[User:Terasail/Edit_Request_Tool.js]]
			importScript('User:Terasail/COI_Request_Tool.js'); // Backlink: [[User:Terasail/COI_Request_Tool.js]]
			importScript('User:Technical_13/Scripts/OneClickArchiver.js'); // Backlink: [[User:Technical_13/Scripts/OneClickArchiver.js]]
			importScript('User:Novem Linguae/Scripts/GANReviewTool.js'); // Backlink: [[User:Novem Linguae/Scripts/GANReviewTool.js]]
			importScript('User:DannyS712/DiscussionCloser.js'); // Backlink: [[User:DannyS712/DiscussionCloser.js]]
			importScript('User:TheTVExpert/rmCloser.js'); // Backlink: [[User:TheTVExpert/rmCloser.js]]
			importScript('User:Chlod/Scripts/Deputy.js'); // Backlink: [[User:Chlod/Scripts/Deputy.js]]
			mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/rater.js]]
			break;
		case 2: // User
			importScript('User:DannyS712/copyvio-check.js'); // Backlink: [[User:DannyS712/copyvio-check.js]]
			importScript("//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-afchelper.js")
			importScript("User:Writ Keeper/Scripts/teahouseUtility.js"); // Gives one-click option to add Teahouse invitation or talkback to a user
			importScript('User:Vukky/Scripts/MoreLove.js'); // Backlink: [[User:Vukky/Scripts/MoreLove.js]]
			break;
		case 3: // User talk
			importScript('User:Technical_13/Scripts/OneClickArchiver.js'); // Backlink: [[User:Technical_13/Scripts/OneClickArchiver.js]]
			importScript('User:DannyS712/DiscussionCloser.js'); // Backlink: [[User:DannyS712/DiscussionCloser.js]]
			importScript("User:Writ Keeper/Scripts/teahouseUtility.js"); // Gives one-click option to add Teahouse invitation or talkback to a user
			importScript('User:Vukky/Scripts/MoreLove.js'); // Backlink: [[User:Vukky/Scripts/MoreLove.js]]
			break;
		case 4: // Wikipedia
			importScript('User:Technical_13/Scripts/OneClickArchiver.js'); // Backlink: [[User:Technical_13/Scripts/OneClickArchiver.js]]
			importScript('User:DannyS712/DiscussionCloser.js'); // Backlink: [[User:DannyS712/DiscussionCloser.js]]
			importScript('User:Eejit43/scripts/rmtr-helper.js'); // Backlink: [[User:Eejit43/scripts/rmtr-helper.js]]
			importScript("User:Writ Keeper/Scripts/teahouseTalkback.js"); // Adds Talkback reminder when you save an edit at the Teahouse
			importScript("User:Writ Keeper/Scripts/teahouseTalkbackLink.js"); // Adds a talkback link to signatures on the Teahouse
			importScript('User:Suffusion of Yellow/effp-helper.js'); // Backlink: [[User:Suffusion of Yellow/effp-helper.js]]
			importScript('User:Chlod/Scripts/Deputy.js'); // Backlink: [[User:Chlod/Scripts/Deputy.js]]
			importScript('User:Suffusion of Yellow/filterDiff.js'); // Backlink: [[User:Suffusion of Yellow/filterDiff.js]]
			importScript('User:Enterprisey/delsort.js'); // Backlink: [[User:Enterprisey/delsort.js]]
			importScript('User:DannyS712/EFFPRH.js'); // Backlink: [[User:DannyS712/EFFPRH.js]]
			break;
		case 5: // Wikipedia talk
			importScript('User:Technical_13/Scripts/OneClickArchiver.js'); // Backlink: [[User:Technical_13/Scripts/OneClickArchiver.js]]
			importScript('User:DannyS712/DiscussionCloser.js'); // Backlink: [[User:DannyS712/DiscussionCloser.js]]
			importScript('User:TheTVExpert/rmCloser.js'); // Backlink: [[User:TheTVExpert/rmCloser.js]]
			importScript('User:Suffusion of Yellow/filterDiff.js'); // Backlink: [[User:Suffusion of Yellow/filterDiff.js]]
			break;
		case 6: // File
			importScript('User:Alexis Jazz/LuckyRename.js'); // Backlink: [[User:Alexis Jazz/LuckyRename.js]]
			importScript('User:Awesome Aasim/xfdvote.js'); // Backlink: [[User:Awesome Aasim/xfdvote.js]]
			break;
		case 10: // Template
			importScript('User:Awesome Aasim/xfdvote.js'); // Backlink: [[User:Awesome Aasim/xfdvote.js]]
			break;
		case 828: // Module
			importScript('User:Awesome Aasim/xfdvote.js'); // Backlink: [[User:Awesome Aasim/xfdvote.js]]
			break;
		case 118: // Draft
			importScript("//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-afchelper.js")
			importScript('User:Headbomb/unreliable.js'); // Backlink: [[User:Headbomb/unreliable.js]]
			importScript('User:SuperHamster/CiteUnseen.js'); // Backlink: [[User:SuperHamster/CiteUnseen.js]]
			mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );
			break;
		default:
			importScript('User:Technical_13/Scripts/OneClickArchiver.js'); // Backlink: [[User:Technical_13/Scripts/OneClickArchiver.js]]
			importScript('User:DannyS712/DiscussionCloser.js'); // Backlink: [[User:DannyS712/DiscussionCloser.js]]
			break;
	};
	// always run
			importScript('User:Wugapodes/Capricorn.js'); // Backlink: [[User:Wugapodes/Capricorn.js]]
			importScript('User:Novem Linguae/Scripts/ShowAdminMessages.js'); // Backlink: [[User:Novem Linguae/Scripts/ShowAdminMessages.js]]
			importScript('User:Ais523/votesymbols.js'); // Backlink: [[User:Ais523/votesymbols.js]]
			importScript('User:Fred_Gandt/confirmLogout.js'); // Backlink: [[User:Fred_Gandt/confirmLogout.js]]
			mw.loader.load('https://cdn.jsdelivr.net/npm/wikiplus-core@latest/dist/Main.js');
			importScript('User:Ahecht/Scripts/pageswap.js'); // Backlink: [[User:Ahecht/Scripts/pageswap.js]]
			importScript('User:Guycn2/UserInfoPopup.js'); // Backlink: [[User:Guycn2/UserInfoPopup.js]]dWarn/.js]]
			importScript('User:10nm/beta.js'); // Backlink: [[User:Zippybonzo/redwarnfork.js]]
			importScript('User:Enterprisey/cv-revdel.js'); // Backlink: [[User:Enterprisey/cv-revdel.js]]
			importScript('User:Zippybonzo/Scripts/ScriptManager.js'); // Backlink: [[User:Zippybonzo/Scripts/ScriptManager.js]]
			importScript('User:Awesome_Aasim/DetectProtectionLevels.js'); // Backlink: [[User:Awesome_Aasim/D
			importScript("//meta.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Hedonil/XTools/XTools.js")
			mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Uziel302/typo.js&action=raw&ctype=text/javascript');
			importScript('User:Ingenuity/AntiVandal.js'); // Backlink: [[User:Ingenuity/AntiVandal.js]]
			importScript('User:Novem Linguae/Scripts/VisualEditorEverywhere.js'); // Backlink: [[User:Novem Linguae/Scripts/VisualEditorEverywhere.js]]
			mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');
			importScript('User:Awesome Aasim/rcpatrol.js'); // Backlink: [[User:Awesome Aasim/rcpatrol.js]]
			importScript('User:Xinbenlv/wldc_nav.js'); // Backlink: [[User:Xinbenlv/wldc_nav.js]]
			importScript('User:Firefly/more-block-info.js'); // Backlink: [[User:Firefly/more-block-info.js]]
			importScript('User:Henrik/js/automod.js'); // Backlink: [[User:Henrik/js/automod.js]]
			importScript('User:Evad37/duplinks-alt.js'); // Backlink: [[User:Evad37/duplinks-alt.js]]
			importScript('User:Bradv/Scripts/Superlinks.js'); // Backlink: [[User:Bradv/Scripts/Superlinks.js]]
			importScript('User:Enterprisey/AFCRHS.js'); // Backlink: [[User:Enterprisey/AFCRHS.js]]
			importScript('User:Ingenuity/preview.js'); // Backlink: [[User:Ingenuity/preview.js]]
			importScript('User:Ingenuity/cleaner.js'); // Backlink: [[User:Ingenuity/cleaner.js]]
			importScript('User:SD0001/shortdescs-in-category.js'); // Backlink: [[User:SD0001/shortdescs-in-category.js]]
			importScript('User:Chlod/Scripts/UserHighlighter.js'); // Backlink: [[User:Chlod/Scripts/UserHighlighter.js]]
			importScript('User:NguoiDungKhongDinhDanh/FormattedEditRequest.js'); // Backlink: [[User:NguoiDungKhongDinhDanh/FormattedEditRequest.js]]
			importScript('User:Terasail/COI Request Tool.js'); // Backlink: [[User:Terasail/COI Request Tool.js]]
			importScript('User:SD0001/GAR-helper.js'); // Backlink: [[User:SD0001/GAR-helper.js]]
			importScript('User:Novem Linguae/Scripts/NPPLinks.js'); // Backlink: [[User:Novem Linguae/Scripts/NPPLinks.js]]
			importScript('User:Novem Linguae/Scripts/ReviewStatus.js'); // Backlink: [[User:Novem Linguae/Scripts/ReviewStatus.js]]
			importScript('User:Novem Linguae/Scripts/VoteCounter.js'); // Backlink: [[User:Novem Linguae/Scripts/VoteCounter.js]]
			importScript('User:Mdaniels5757/markAdmins.js'); // Backlink: [[User:Mdaniels5757/markAdmins.js]]

window.markAdminCfg = {
	groups: {
		'abusefilter': { enabled: true },
		'abusefilter-helper': { enabled: true },
		'accountcreator': { enabled: true },
		'autoreviewer': { enabled: true },
		'extendedmover': { enabled: true },
		'filemover': { enabled: true },
		'massmessage-sender': { enabled: true },
		'templateeditor': { enabled: true },
		'vrt-permissions': { enabled: true },
		'patroller': { enabled: true },
		'reviewer': { enabled: true },
		'rollbacker': { enabled: true },
	}
};