User:Platonides/vector.js

addPortletLink('p-personal', 'http://www.mediawiki.org/wiki/Special:Code/MediaWiki', 'Code Review', 'p-Code-Review', null, null, document.getElementById('pt-userpage') );

if ( wgPageName == "Special:Code" ) { addOnloadHook( function {  if ( document.getElementById('path') ) {     document.getElementById('path').onchange = function {        var path = document.getElementById('path').value;        var n = path.indexOf( '/' );        switch ( path.substring( 0, n ) ) {          case 'phase3':          case 'extensions':            document.getElementById('path').value = "/trunk/" + path;            break;          case 'skins':          case 'maintenance':          case 'includes':            document.getElementById('path').value = "/trunk/phase3/" + path;            break;        }     }   } });

addOnloadHook( function {	var a = document.createElement('a');	a.href = wgArticlePath.replace( "$1", "Special:Code/MediaWiki/status/fixme?author=" + wgUserName.toLowerCase );	a.appendChild( document.createTextNode( 'my fixmes' ) );

var next = document.getElementById('contentSub').getElementsByTagName('a')[4]; next.parentNode.insertBefore(a, next); next.parentNode.insertBefore(document.getElementById('contentSub').getElementsByTagName('a')[3].nextSibling.cloneNode(false), next); }); }