JavaScript-accessible functions have been added for this in SVN r7983 - see wiki! Now you only need to convince Shideravan to add it to his templates - or try yourself and provide a patch! The example templates also don't support it yet.

A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]