|
Post by Survvie on Feb 4, 2011 18:03:18 GMT -5
I noticed someone already suggested Tables, and it was implemented.
This code is a favorite of mine, that allows UBBC tables with a scroll bar positioned somewhere on them. I prefer- and others might too, I have no idea- a scrolling table myself, as more text can be fit into them without using as much space as a regular table. C:
Applying it doesn't affect all tables, just the ones with special tags, which I've come to favor over my roleplaying years.
I have the code here- It is one of Wormos, and goes in the global footer beneath all other codes - if you would care to implement it. (:
<script type="text/javascript"> <!-- // scrollerDiv UBBC in posts // By Wormopolis - [url]www.wormocodes.com[/url]
// use [scrolly:flags][/scrolly] in post around text // flags are: // h(n) height, n=height in pix // w(n) width, n=width in pix // sx scroll x direction // sy scroll y direction // c(hex) color, hex=color in hex // flags seperated by commas: [scrolly:h(100),w(50),sy] blah blah blah [/scrolly]
for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) {
if (tds[i].width=="80%" && tds[i].className.match(/windowbg/) && tds[i].vAlign=="top" && tds[i].innerHTML.match(/\[scrolly(?:\:(.*?))?\]([\s\S]*?)\[\/scrolly\]/i) && !tds[i].innerHTML.match(/\[norunubbc\]/)) { flgs=RegExp.$1; lovetext=RegExp.$2; tmp='<div class="postDiv'+(flgs.match(/ac\(([\w\s]+?)\)/) ? ' '+RegExp.$1:'')+'" style="'+(flgs.match(/h\((\d+)\)/) ? 'height:'+RegExp.$1+';' : '')+(flgs.match(/w\((\d+)\)/) ? 'width:'+RegExp.$1+';' : '')+(flgs.match(/sx/) ? 'overflow-x:auto; white-space: nowrap;' : '')+(flgs.match(/sy/) ? 'overflow-y:auto;' : '')+(flgs.match(/c\((\w+)\)/) ? 'background-color:'+RegExp.$1+';' : '') +(flgs.match(/as\((.+?)\)/) ? RegExp.$1+';':'')+'" '+(flgs.match(/sx/) ? 'noWrap="nowrap" ' : '') + '>'+ lovetext + '</div>';
postCell=tds[i].getElementsByTagName('table')[0].rows[1].cells[0]; postCell.innerHTML=postCell.innerHTML.replace(/\[scrolly(?:\:(.*?))?\]([\s\S]*?)\[\/scrolly\]/i,tmp);
i--; } }
--> </script>
|
|
|
Post by { b l u e } on Feb 4, 2011 20:20:47 GMT -5
Haha, so many code suggestions. xD Thank you for your input as well! The code's being added right now. :3
|
|