Friday, September 30, 2011


Remove unnecessary links for older / newer posts in Blogger

This hack was inspired by this discussion thread on Blogger forums. First I made the solution (remove the Show older posts link in the grey box) which I describe in the last post, which is already quite good. But then I developed it further, and now it can remove unnecessary links in label searches almost every time, like 95% or 19/20 (it cannot always know if it is ok to remove the link, and then it does not).

This script uses getElementsByClassName, and some older browsers don't have it, so first install the function to your template using the instructions here.

Then you must install the post count hack. You don't have to set the window title, we'll just use the numPosts variable.

After installing those two, open your template html again, search for </body>, and insert this code before it:

Data provided by - Download Raw

And there it is, many of the unnecessary and even confusing links are now removed in label searches. I'm really no javascript guru and one could possibly check the links some better way, but this works and it is good enough for me. :)


Aigars said... [reply]

OMG! This really works. Although I have to combine your 3 posts together!

I love you!

Post a Comment

Related Posts Plugin for WordPress, Blogger...
See the hack
for this dynamic
views icon: