Simie
Coding Admin
Why are you all still here?
Posts: 721
|
Post by Simie on Feb 17, 2007 8:02:31 GMT -5
w00t. This simple adds a nice little link next to each bit in the topic summery, and when you click it, it adds it as a quote.... <script type="text/javascript"> function getElm(elm){ return document.getElementsByTagName(elm); } var sFont = getElm('font'); if(document.postForm){ for(i=0;i<sFont.length;i++){ if(sFont[i].size == '2' && sFont[i].innerHTML.match(/Posted by .?/i) && sFont[i].parentNode.parentNode.parentNode.parentNode.innerHTML.match(/Topic\sSummary/i)){ sFont[i].innerHTML += ' <a href="javascript:void(0);" onclick="addThis(this);">Quote</a>'; } } } function addThis(that){ var theQuoteThing = that.parentNode.parentNode.parentNode.nextSibling.firstChild.firstChild.innerHTML; theThing = theQuoteThing.replace(/\<br\>/ig, '\n', theQuoteThing); theQuoteToAdd = '[quote]'+theThing+'[/quote]'; document.postForm.message.value+=theQuoteToAdd; } </script> Global Footer
|
|