User:FatalError/monobook.js

importScript('User:AzaToth/morebits.js'); importScript('User:AzaToth/twinklefluff.js'); importScript('User:AzaToth/twinklewarn.js'); importScript('User:AzaToth/twinklediff.js'); importScript('User:AzaToth/twinklespeedy.js');

TwinkleConfig = { watchWarnings : false };

addOnloadHook (	function {		if ((wgCanonicalNamespace == 'User' || wgCanonicalNamespace == 'User_talk') && wgTitle.indexOf('/') == -1) {			var li = document.createElement('li');			li.setAttribute('id', 'ca-contrib');			var a = document.createElement('a');			a.setAttribute('title', 'View the user\'s contributions');			a.setAttribute('href', wgServer + '/wiki/Special:Contributions/' + wgTitle.split('/')[0]);			var txt = document.createTextNode('Contribs');			a.appendChild(txt);			li.appendChild(a);			var edit = document.getElementById('ca-edit') || document.getElementById('ca-viewsource');			// Set the padding and stuff so it doesn't look weird			var editPadding = window.getComputedStyle(edit, null).padding;			var userPadding = window.getComputedStyle(document.getElementById('ca-nstab-user'), null).padding;			li.style.padding = editPadding;			edit.style.padding = userPadding;			edit.parentNode.insertBefore(li, edit); }	} );