Post by Schubaltz on Jul 2, 2007 12:14:11 GMT -5
Description: Replaces the standard table with a textarea.
Source: Open
Cross-browser: Yes
Editing:
white - # rows
blue - # columns
Global Footer
<script type="text/javascript">
<!--
// Code Tag Modification (Textarea)
if(location.href.match(/action=((pm|calendar)view|display)/))
for(var l = document.links, k = 4; k < l.length; k ++) if(l[k].className == "nav") {
for(var i = l[k].parentNode.getElementsByTagName("table")[1].rows, x = 1; x < i.length; x ++)
if(i[x].cells[0].className.match(/windowbg2?/) && i[x].cells[1].innerHTML.match(/quote><b>code:/i)) {
var e = i[x].cells[1].firstChild.rows[1].cells[0].getElementsByTagName("blockquote");
for(var f = 0; f < e.length; f ++) {
var s = e[f].getElementsByTagName("table")[1];
if(s && s.className && s.className == "code") {
var n = document.createElement("textarea");
n.className = "code"; n.rows = 10; n.cols = 76;
n.value = s.rows[0].cells[0].firstChild.innerHTML.replace(/<br>/gi, "\n");
var t = document.createComment(n.value);
s.parentNode.replaceChild(n, s);
e[f].getElementsByTagName("table")[0].style.backgroundColor = "transparent";
var r = document.createElement("input");
r.type = "button"; r.value = "Reset";
r.onclick = function() {
this.parentNode.getElementsByTagName("textarea")[0].value = this.nextSibling.data;
}
var u = document.createElement("input");
u.type = "button"; u.value = "Select All";
u.onclick = function() {
this.parentNode.getElementsByTagName("textarea")[0].select();
}
e[f].appendChild(r);
e[f].appendChild(t);
e[f].appendChild(u);
}
}
}
break;
}
//-->
</script>
Source: Open
Cross-browser: Yes
Editing:
white - # rows
blue - # columns
Global Footer
<script type="text/javascript">
<!--
// Code Tag Modification (Textarea)
if(location.href.match(/action=((pm|calendar)view|display)/))
for(var l = document.links, k = 4; k < l.length; k ++) if(l[k].className == "nav") {
for(var i = l[k].parentNode.getElementsByTagName("table")[1].rows, x = 1; x < i.length; x ++)
if(i[x].cells[0].className.match(/windowbg2?/) && i[x].cells[1].innerHTML.match(/quote><b>code:/i)) {
var e = i[x].cells[1].firstChild.rows[1].cells[0].getElementsByTagName("blockquote");
for(var f = 0; f < e.length; f ++) {
var s = e[f].getElementsByTagName("table")[1];
if(s && s.className && s.className == "code") {
var n = document.createElement("textarea");
n.className = "code"; n.rows = 10; n.cols = 76;
n.value = s.rows[0].cells[0].firstChild.innerHTML.replace(/<br>/gi, "\n");
var t = document.createComment(n.value);
s.parentNode.replaceChild(n, s);
e[f].getElementsByTagName("table")[0].style.backgroundColor = "transparent";
var r = document.createElement("input");
r.type = "button"; r.value = "Reset";
r.onclick = function() {
this.parentNode.getElementsByTagName("textarea")[0].value = this.nextSibling.data;
}
var u = document.createElement("input");
u.type = "button"; u.value = "Select All";
u.onclick = function() {
this.parentNode.getElementsByTagName("textarea")[0].select();
}
e[f].appendChild(r);
e[f].appendChild(t);
e[f].appendChild(u);
}
}
}
break;
}
//-->
</script>