Skip to content

Instantly share code, notes, and snippets.

@karlgroves
Created January 31, 2014 17:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlgroves/f1abf39d950b834f1b46 to your computer and use it in GitHub Desktop.
Save karlgroves/f1abf39d950b834f1b46 to your computer and use it in GitHub Desktop.
Add this bookmarklet to your browser. Activate the bookmarklet and as you tab through the site you should see a red border around whatever gets focus
javascript:(function(){var%20ua=navigator.userAgent.toLowerCase(),ie=ua.indexOf(%22msie%22)!=-1?ua.substr(ie+5,1):0,outlineProp=ie%3C8?%22border%22:%22outline%22,activeItem;function%20styleFocus(e){if(activeItem){activeItem.style[outlineProp]=%22%22;}activeItem=e.target||e.srcElement;if(activeItem){activeItem.style[outlineProp]=%22solid%202px%20red%22;}}if(document.addEventListener){document.addEventListener(%22focus%22,styleFocus,true);}else{document.attachEvent(%22onfocusin%22,styleFocus);}}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment