javascript interface for the piglow