User:Cåm/global.js

/* */

/*jshint forin:true, eqeqeq:true, quotmark:single, bitwise:true, strict:true, undef:true, unused:false, curly:true, undef:true, browser:true, trailing:true, jquery:true, indent:4 */ /*global mediaWiki, importArticles */

// import variables var monoBookText = 'Monobook', oasisText = 'Oasis', fdButtons = [];

// Fastdelete button names fdButtons[fdButtons.length] = { // RuneScape Wiki only 'summary': 'Successful RfD', 'label': 'RfD' };

fdButtons[fdButtons.length] = { 'summary': 'housekeeping', 'label': 'housekeeping' };

/** * Imports * See separate import comments for details * Remember to add a comma after each page except the last * To do: Move AntiUnicruft & Tabkey to Greasemonkey (or equivalent) */ importArticles({	type: 'script',	articles: [		'u:dev:AjaxUndo/code.js',		// Add a undo link to page diffs and histories			'u:dev:AllPagesHideRedirect/code.js',	// Adds a hide redirect button to AllPages & PrefixIndex		'u:dev:AntiUnicruft/code.js',		// Removes invisible characters		'u:dev:FastDelete/code.js',		// Fast Delete buttons		'u:dev:SkinSwitchButton/code.js',	// Switch between Monobook & Oasis		'u:dev:UnsafeScripts/code.js',		// Allows import of scripts into .js pages		'u:kangaroopower:MediaWiki:Scope.js',	// FindReplace function for source editor		'u:runescape:User:Cåm/oldfilepages.js',	// Changes file pages back to original styling		'u:runescape:User:Joeytje50/tabkey.js',	// Allows use of tabkey for use in scripts		'u:wikimarks:Client.js'			// Customisable On The Wiki tab	] });

(function ($, mw) {

'use strict';

/**	 * Special:Editcount link in profile masthead * By User:Matthew2602 * Fixed for Special:Contributions by User:Cåm */	if ($('#UserProfileMasthead').length) { if (mw.config.get('wgCanonicalNamespace') === 'Special') { var user = mw.config.get('wgTitle').split('/'); $('#UserProfileMasthead .tally em').html('' + $( '#UserProfileMasthead .tally em').text + ''); } else { $('#UserProfileMasthead .tally em').html('' + $('#UserProfileMasthead .tally em').text + ''); }	}

/**	 * Unchecks redirect checkbox on file pages * Because redirects in file namespace are useless */	if(mw.config.get('wgCanonicalSpecialPageName') === 'Movepage' && (/File/).test(mw.config.get('wgTitle'))) { $('#wpLeaveRedirect').removeAttr('checked'); } }(jQuery, mediaWiki));

/* */