User:Enterprisey/up-one-lvl-kbd.js

$( function {   var breadcrumbEl = document.getElementsByClassName( "subpages" )[0];    if( breadcrumbEl ) {        mw.loader.using( [ "mediawiki.util" ], function  {

// If someone's already using the "U" access key, clear that var hasOurAccessKey = document.querySelectorAll( "a[accesskey=u]" ); for( var i = 0; i < hasOurAccessKey.length; i++ ) { hasOurAccessKey[i].setAttribute( "accesskey", "" ); $( hasOurAccessKey[i] ).updateTooltipAccessKeys; }

var lastSubpage = breadcrumbEl.children[ breadcrumbEl.children.length - 1 ]; lastSubpage.accessKey = "u"; $( lastSubpage ).updateTooltipAccessKeys; } );   } } );