// ==UserScript==
// @name           accesskeys-reveal
// @namespace      http://eldar.cz/myf/pub/firefox/
// @description    Displays accesskeys aside form elements that have any; intended for usage with certain userstyle.
// @include        *
// ==/UserScript==

for ( var i = 0; i < document.forms.length; i++ ) {
 for ( var j = 0; j < document.forms[i].elements.length; j++ ) {
  var e = document.forms[i].elements[j];
  if ( e.tagName == 'BUTTON') {
   continue
  }
  if ( e.getAttribute('accesskey') ) {
   var label = document.createElement('span');
   var key = document.createTextNode( e.getAttribute('accesskey') );
   label.appendChild( key ) ;
   label.setAttribute('class','my_accesskey');
   e.parentNode.insertBefore( label , e.nextSibling );
  }
 }
}
