Skip to content

Instantly share code, notes, and snippets.

@angusdev
Created July 2, 2013 05:10
Show Gist options
  • Save angusdev/5906904 to your computer and use it in GitHub Desktop.
Save angusdev/5906904 to your computer and use it in GitHub Desktop.
A bookmarklet to show all items of a drop down list. Click bookmarklet to activate then click on the drop down list will create a textarea to display all items. Click bookmarklet again to deactivate. Tested in Chrome/Firefox, doesn't work on IE6.
javascript:(function(){if(window._bak_md){document.onmousedown=window._bak_md;window._bak_md=null;}else{window._bak_md=document.onmousedown||function(){};document.onmousedown=function(e){e=e||window.event;t=e.target;if(t.tagName=='SELECT'){x=document.createElement('textarea');for(i=0;i<t.options.length;i++)x.value+=((i>0?'\n':'')+t.options[i].textContent);t.parentNode.insertBefore(x,t);e.preventDefault();e.stopPropagation();}};}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment