User:Ale jrb/Scripts/contreverse.js

function contReverseMain { var me = this; this.init = function { var action = mw.config.get('wgAction'); var pagename = mw.config.get('wgPageName'); if ( ( action == 'view' ) && ( pagename == 'Special:Contributions' ) ) { var bodyContent = document.getElementById ( 'bodyContent' ); regTest = /\(((?:]+?>)?diff(?:<\/a>)?)(?: | )\| (]+?>hist<\/a>)\)/ig; bodyContent.innerHTML = bodyContent.innerHTML.replace ( regTest, "($2 | $1)" ); }		}	}

var contReverse = new contReverseMain ; $(window).on( 'load', contReverse.init );