/ 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: http://tinyurl.com/34y32r. Can be used as a starting point for other bookmarklets that will temporarily modify CSS. (Refresh will undo the changes.)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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); } })();
Comments
