Post by ialex on May 5, 2008 0:13:51 GMT -8
This code will move the 'Add Poll' button just after the reply button.
Cross Browser.
Global Footer.
<script type="text/javascript">
<!--
/*Move Add Poll Button - By iAlex - Open Source*/
var iMove_Poll={
iLocate_Poll: function(){
if(window.location.href.match(/action=(display|(user)?recent)/) || window.location.href.match(/index.cgi$/) && document.title.match(/\s-\sSearch\sResults/)){
this.iPoll_Button();
}
},
iTd: document.getElementsByTagName('td'),
iPoll_Button: function(){
var i=this.iTd.length-1;
do{
if(this.iTd.item(i).width=="50%" && this.iTd.item(i).align=="right" && this.iTd.item(i).firstChild && this.iTd.item(i).firstChild.nodeName=="A" && this.iTd.item(i).firstChild.href.match(/createpoll/) && this.iTd.item(i).firstChild.firstChild && this.iTd.item(i).firstChild.firstChild.nodeName=="IMG" && this.iTd.item(i).firstChild.firstChild.alt=="[Add Poll]"){
this.iTd.item(i).insertBefore(this.iTd.item(i).firstChild.nextSibling, this.iTd.item(i).firstChild.nextSibling.nextSibling.nextSibling);
this.iTd.item(i).insertBefore(this.iTd.item(i).firstChild, this.iTd.item(i).firstChild.nextSibling.nextSibling.nextSibling);
}
i--;
}
while(i>6);
}
}
iMove_Poll.iLocate_Poll();
//-->
</script>
Cross Browser.
Global Footer.
<script type="text/javascript">
<!--
/*Move Add Poll Button - By iAlex - Open Source*/
var iMove_Poll={
iLocate_Poll: function(){
if(window.location.href.match(/action=(display|(user)?recent)/) || window.location.href.match(/index.cgi$/) && document.title.match(/\s-\sSearch\sResults/)){
this.iPoll_Button();
}
},
iTd: document.getElementsByTagName('td'),
iPoll_Button: function(){
var i=this.iTd.length-1;
do{
if(this.iTd.item(i).width=="50%" && this.iTd.item(i).align=="right" && this.iTd.item(i).firstChild && this.iTd.item(i).firstChild.nodeName=="A" && this.iTd.item(i).firstChild.href.match(/createpoll/) && this.iTd.item(i).firstChild.firstChild && this.iTd.item(i).firstChild.firstChild.nodeName=="IMG" && this.iTd.item(i).firstChild.firstChild.alt=="[Add Poll]"){
this.iTd.item(i).insertBefore(this.iTd.item(i).firstChild.nextSibling, this.iTd.item(i).firstChild.nextSibling.nextSibling.nextSibling);
this.iTd.item(i).insertBefore(this.iTd.item(i).firstChild, this.iTd.item(i).firstChild.nextSibling.nextSibling.nextSibling);
}
i--;
}
while(i>6);
}
}
iMove_Poll.iLocate_Poll();
//-->
</script>