Jump to content

User:Izno/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Izno (talk | contribs) at 01:30, 29 June 2021 (rm). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
function load_script(script) {
	return mw.loader.load('/w/index.php?title=' + script + '&action=raw&ctype=text/javascript');
}

function load_scripts (scripts) {
	scripts.forEach(load_script);
}

var all_spaces_scripts = [
	'User:Evad37/rater.js', // [[User:Evad37/rater]]
	'User:Izno/persistentParams.js',
	'User:Qwertyytrewqqwerty/DisamAssist.js', // [[User:Qwertyytrewqqwerty/DisamAssist.js]]
	'User:Frietjes/findargdups.js', // [[User:Frietjes/findargdups]]
	'User:SD0001/quickViewDeleted.js', // [[User:SD0001/quickViewDeleted.js]]
	'User:Headbomb/unreliable.js', // [[User:Headbomb/unreliable]] and by request [[User:Headbomb/unreliable.js]]
	// 'User:PerfektesChaos/js/lintHint/r.js', // [[User:PerfektesChaos/js/lintHint]]
];

load_scripts(all_spaces_scripts);

if( mw.config.get('wgNamespaceNumber') === 0 ) {
	
	var mainspace_scripts = [
		'User:Ohconfucius/script/MOSNUM_dates.js', // [[User:Ohconfucius/script/MOSNUM dates.js]]
		'User:Shubinator/DYKcheck.js', // [[User:Shubinator/DYKcheck]]
		'User:Trappist_the_monk/HarvErrors.js', // [[User:Trappist_the_monk/HarvErrors.js]]
	];

	load_scripts(mainspace_scripts);
}
else {
	
	var otherspace_scripts = [
		'User:Jackmcbarn/editProtectedHelper.js', //[[User:Jackmcbarn/editProtectedHelper.js]]
		'User:MusikAnimal/responseHelper.js', // [[User:MusikAnimal/responseHelper]]
		'User:Newslinger/Notifier.js', // [[User:Newslinger/Notifier.js]]
		'User:Bellezzasolo/Scripts/arb.js', // [[User:Bellezzasolo/Scripts/arb]]
		'User:Technical_13/Scripts/OneClickArchiver.js', // [[User:Technical 13/Scripts/OneClickArchiver]]
		'User:Σ/Testing_facility/Archiver.js', // [[User:Σ/Testing facility/Archiver]]
		'User:Enterprisey/delsort.js', // [[User:Enterprisey/delsort]]
		'User:Enterprisey/easy-brfa.js', // [[User:Enterprisey/easy-brfa]]
	];
	
	load_scripts(otherspace_scripts);
	
	if (mw.config.get('wgPageName') !== 'Special:RecentChanges') {
		load_script('User:Bradv/Scripts/ExpandDiffs.js'); // [[User:Bradv/Scripts/ExpandDiffs]]
	}
}