User:Kenrick95/vector.js

/**

WYSIWTF! by Magnus Manske
document.write(' ');

Edit section 0 (zero); transferred from w:id:MediaWiki:Common.js
*/ function addEdittopPortletLink { if(mw.config.get('wgCanonicalNamespace') == 'Special') return; if(document.getElementById("wikiPreview")) return; if(document.getElementById("histlegend‎")) return; if(document.getElementById("difference‎")) return; if(document.getElementById("watchdetails")) return; if ( document.getElementById( "ca-edit" ) ) { var sElm = document.getElementById( "ca-addsection" ) ? 'ca-addsection' : 'ca-edit'; var sText = '↑'; var sLink = mw.config.get('wgScriptPath') + "/index.php?title=" + mw.config.get('wgPageName') + "&action=edit&section=0"; mw.util.addPortletLink( 'p-cactions', sLink, sText, 'ca-edittop',   'Edit section zero', null, document.getElementById( sElm ).nextSibling ); } } addOnloadHook( addEdittopPortletLink );