Posted By

Todd on 11/11/07


dropdown bookmarklet OpenAir

Versions (?)

Bookmarklet to resize dropdowns

 / Published in: JavaScript

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: Can be used as a starting point for other bookmarklets that will temporarily modify CSS. (Refresh will undo the changes.)

  1. 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); } })();

Report this snippet  


RSS Icon Subscribe to comments
Posted By: Todd on November 11, 2007

You need to login to post a comment.