More or less ported Golo's plugin to jasic