Jump to content

User:DannyS712/Examine edits.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.
// Install with:
// <code><nowiki>		{{subst:Iusc|User:DannyS712/Examine edits.js}}																	</nowiki></code>
// or with
// <code><nowiki>		importScript( 'User:DannyS712/Examine edits.js' ); // Backlink: [[User:DannyS712/Examine edits.js]] 				</nowiki></code> 
//
// If forking this script, please note my contributions / give me credit
//<nowiki>
$(function() {
var DS_config = {
	name: '[[User:DannyS712/Examine edits|Examine edits.js]]',
	version: 1.1,
	debug: false
};
var page = mw.config.get('wgCanonicalSpecialPageName');
if (page && page === 'Contributions'){
	var user = mw.config.get('wgRelevantUserName');
	var examine_link = '/wiki/Special:AbuseFilter/examine?wpSearchUser=' + encodeURIComponent(user) + '&submit=1';
	if (DS_config.debug) console.log( examine_link );
	var $links = $('#contentSub > .mw-contributions-user-tools > .mw-changeslist-links');
	if (DS_config.debug) console.log( $links );
	$links.append(
		$( '<span>' ).append(
			$( '<a>' )
				.attr( 'href', examine_link )
				.text( 'examine past edits' )
		)
	);
}

});
//</nowiki>