cheesysmookums
01-10-2005, 03:28 AM
I have the script to limit the number of blog entries per page but does it work on xangas that aren't originals? because I have customized modules and it's not working? Is that the reason why? Here's the script btw ..
<script>
// By: Paul Chen (Kaiyotee)
// Blogring.net
numberOfEntries = 2; //Change this value here...
if(location.pathname=='/home.aspx'){
var tds = document.getElementsByTag Name ('a');
for (var i = 0; i < tds.length; i++) {
timeString = tds[i].innerText;
if(timeString.match(/\d+:\d+ [ap]m\b/i)){break;}
}
stuff = tds[i].parentNode.parentNode.pa rentNode.parentNode.paren tNode;
for(j=1;j<numberOfEntries;j++){
stuff=stuff.nextSibling.n extSibling.nextSibling
if(stuff.tagName=='BR'){
stuff=stuff.previousSibli ng;
}
}
for(i=0;i<20;i++){
if(stuff.tagName=='HR' && stuff.nextSibling.tagName =='TABLE')
{
stuff.nextSibling.removeN ode(true);
break;
}
stuff = stuff.nextSibling;
stuff.style.display='none ';
}}
</script>
<script>
// By: Paul Chen (Kaiyotee)
// Blogring.net
numberOfEntries = 2; //Change this value here...
if(location.pathname=='/home.aspx'){
var tds = document.getElementsByTag Name ('a');
for (var i = 0; i < tds.length; i++) {
timeString = tds[i].innerText;
if(timeString.match(/\d+:\d+ [ap]m\b/i)){break;}
}
stuff = tds[i].parentNode.parentNode.pa rentNode.parentNode.paren tNode;
for(j=1;j<numberOfEntries;j++){
stuff=stuff.nextSibling.n extSibling.nextSibling
if(stuff.tagName=='BR'){
stuff=stuff.previousSibli ng;
}
}
for(i=0;i<20;i++){
if(stuff.tagName=='HR' && stuff.nextSibling.tagName =='TABLE')
{
stuff.nextSibling.removeN ode(true);
break;
}
stuff = stuff.nextSibling;
stuff.style.display='none ';
}}
</script>