Post by Zaxinou on Jul 6, 2011 11:22:33 GMT 10
This code was made by iAlex and I'm reposting here.
This code will modify the function of changing pages and take it back to how it was in Proboards Version 4.
Preview: Click
Global Footer.
Cross Browser.
Proboards.
This code will modify the function of changing pages and take it back to how it was in Proboards Version 4.
Preview: Click
Global Footer.
Cross Browser.
Proboards.
<script type="text/javascript">
<!--
/*PBv4 Styled Drop Down Pages - By iAlex - Open Source*/
var iTake_Me_Back={
iTo_PB_v4: function(){
if(document.getElementById('pageNo1')){
this.iNostalgic_Pages('pageNo1');
}
if(document.getElementById('pageNo2')){
this.iNostalgic_Pages('pageNo2');
}
},
iNostalgic_Pages: function(iMiss_The_Past){
document.getElementById('pagedropmenu').style.visibility='hidden';
var iReminisce_The_Past=document.getElementById(iMiss_The_Past);
var iRecreate_A_Memory=document.createElement('select');
var iParent_Of_Change=iReminisce_The_Past.parentNode.parentNode;
var iParent_Of_Change=(iParent_Of_Change.nodeName.match(/span/i))? iParent_Of_Change.parentNode : iParent_Of_Change;
var iStart_Of_Page=(iParent_Of_Change.innerHTML.match(/Page (\d+) of/))? RegExp.$1 : '';
var iEnd_Of_Page=(iParent_Of_Change.getElementsByTagName('a').item(0).innerHTML.match(/(\d+)/))? parseInt(RegExp.$1) : parseInt(iParent_Of_Change.getElementsByTagName('a').item(1).innerHTML);
var iLink_To_Past=iParent_Of_Change.getElementsByTagName('a').item(0).href.replace(/page=(\d+)$/, 'page=');
for(var i=1;i<=iEnd_Of_Page;i++){
if(i==iStart_Of_Page){
iRecreate_A_Memory.options[iRecreate_A_Memory.length]=new Option('Page '+i, iLink_To_Past+i);
}
else{
iRecreate_A_Memory.options[iRecreate_A_Memory.length]=new Option(i, iLink_To_Past+i);
}
}
iRecreate_A_Memory.selectedIndex=iStart_Of_Page-1;
iRecreate_A_Memory.onchange=function(){window.location=this.value;};
var iParent_Of_Change=(iParent_Of_Change.firstChild.nodeName.match(/font/i))? iParent_Of_Change.firstChild : iParent_Of_Change;
var iLiving_In_Memories=iParent_Of_Change.getElementsByTagName('span').item(0);
var iCompensating_For_Change=iParent_Of_Change.getElementsByTagName('b');
if(window.opera && iRecreate_A_Memory.selectedIndex!=iRecreate_A_Memory.length-1){
var iWant_The_Past=(iCompensating_For_Change.item(1).innerHTML=="Go")? 0 : 1;
iParent_Of_Change.insertBefore(iCompensating_For_Change.item(iWant_The_Past).parentNode, iLiving_In_Memories.nextSibling);
iParent_Of_Change.insertBefore(document.createTextNode(' '), iLiving_In_Memories.nextSibling);
}
iParent_Of_Change.replaceChild(iRecreate_A_Memory, iLiving_In_Memories);
iReminisce_The_Past.nextSibling.nextSibling.style.display='none';
iReminisce_The_Past.parentNode.removeChild(iReminisce_The_Past.previousSibling);
iReminisce_The_Past.style.display='none';
}
}
iTake_Me_Back.iTo_PB_v4();
//-->
</script>