Return to Snippet

Revision: 4237
at November 11, 2007 23:00 by Todd


Initial Code
javascript:(function(){var newSS, styles='select { width: 340px; }'; if(document.createStyleSheet) { document.createStyleSheet(%22javascript:'%22+styles+%22'%22); } else { newSS=document.createElement('link'); newSS.rel='stylesheet'; newSS.href='data:text/css,'+escape(styles); document.getElementsByTagName(%22head%22)[0].appendChild(newSS); } })();

Initial URL


Initial Description
This was created as a temporary solution to the wide dropdowns that sometimes appear in OpenAir timesheets and cause horizontal scrolling. Adding this script as a bookmarklet and clicking it will resize all selects (dropdowns) on a page to 340px wide. Adapted from this bookmarklet: http://tinyurl.com/34y32r. Can be used as a starting point for other bookmarklets that will temporarily modify CSS. (Refresh will undo the changes.)

Initial Title
Bookmarklet to resize dropdowns

Initial Tags
dropdown

Initial Language
JavaScript