Port to Trac 0.12 from http://trac-hacks.org/wiki/NikoNikoPlugin