| Customisation of visible posts |
It occurred to me today that its not too hard to hide categories of posts on the HTML version of my site as well. The site has now been changed to have a link at the top of each post which offers to hide that category in the future. If that category is already hidden, then it offers instead to unhide it. The preference information is stored in a series of cookies, so is of course specific to a browser on a given machine. Because its all done in JavaScript, I have no logging of who is hiding what or anything like that. The cookies will expire after 30 days of non-use.
Posts are never completely hidden however -- you will still see the title. This seemed a reasonable compromise and left me with somewhere to display the link offering to unhide the content. It also gives people a very brief summary of what they are missing.
One wart is that when you change your hiding preferences the page is reloaded. This is because I had trouble finding a way to hide divs which worked on plenty of browsers and didn't require unique div ids for each post, which I would need to them iterate through for all posts in a given category. I'd love it if someone with higher JavaScript foo could tell me how to avoid the page reload, as I am sure it will be annoying for some.
So there you go.
Tags for this post: site(
posted at: 05:42 | path: /site | permanent link to this entry
There are no comments on this post which have survived moderation. 4 posts have been culled and 0 blocked. Be the first to make a non-spam comment here, please!
