rewrite_supportbox.js
22 lines
| 562 B
| application/javascript
|
JavascriptLexer
| r2 | /* track down the ad box */ | |||
| var supportbox = document.getElementById('support'); | ||||
| var adboxes = supportbox.getElementsByTagName('div'); | ||||
| var adbox; | ||||
| for(x = 0; x < adboxes.length; x++) { | ||||
| if('thewrap' == adboxes[x].className) { | ||||
| adbox = adboxes[x]; | ||||
| break; | ||||
| } | ||||
| } | ||||
| /* Track down the half ads */ | ||||
| var ads = adbox.getElementsByTagName('span'); | ||||
| var placeholders = 0; | ||||
| for(x = 0; x < ads.length; x++) { | ||||
| if('oa-placeholder' == ads[x].className) | ||||
| placeholders++; | ||||
| } | ||||
| /* Clobber the half ads if both are placeholders */ | ||||
| if(2 == placeholders) | ||||
| adbox.style.display = 'none'; | ||||
