because there's always something more interesting than what you should be doing

Currently showing posts tagged: javascript

Facebook goes some way towards making it easy for you to invite groups of friends to an event, but it still requires a mouse click for each person you want to invite. If you have a friend list containing more than a handful of people, this rapidly gets tedious. Don’t worry though! Here’s a way to select the whole list in one go.

Unfortunately it turns out that Blogger’s XML-based template layout system is not quite as flexible as it first seems. It’s almost superb, but has some key omissions:

Flow control is limited to <b:if>, <b:else>, and <b:loop>. Crucially, you can’t break out of a loop.

No writable variables of any kind.

Conditional testing via <b:cond> is extremely limited. I kept expecting to find some comprehensive documentation for the xmlns:expr namespace (which is used via things like <a expr:href='data:blog.homepageUrl + "search/label/foo"'>), but it doesn’t exist, simply because all you can really do is simple comparisons using a limited set of data and hardcoded strings.

There are no string-handling functions, and you can’t get access to the current QUERY_STRING to do any kind of parametrisation (for example, show some HTML saying which label you are currently viewing based on what comes after /search/label/ in the current URL).

The box generated by the status-message includable is hardcoded to either be invisible or say “Showing label foo. Show all posts”. It cannot be customised.