#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,323
January 2004
todge
|
Post by Todge on Apr 17, 2006 14:22:57 GMT -8
This will allow you to hi-lite the text you want to quote BEFORE you hit the quote button..
Put it in your Global Footer..
<script type="text/javascript"> <!-- /* Quote selected text by Todge Copyright © 2006 Please keep this header intact */
function getSel() { var txt = ''; if (window.getSelection) { txt = window.getSelection(); } else if (document.getSelection) { txt = document.getSelection(); } else if (document.selection) { txt = document.selection.createRange().text; } else return; if(txt!='') { txt = '&message=[quote]'+txt+'[/quote]'; var text = txt.split('#').join(''); } return txt; }
var quoteButton = document.getElementsByTagName('a'); for(t=0; t<quoteButton.length; t++) { if(quoteButton[t].href.match('quote=')) { quoteButton[t].onmouseover = function(){this.href+=getSel().replace(/#/g,'').replace(/\*/g,'');} quoteButton[t].onmouseout = function(){this.href=this.href.split('&message')[0];} } } // --> </script>
It will ONLY quote text, and will remove the line breaks.
If you don't select anything to quote then the whole post will be quoted as normal.
|
|