JavaScript: Sexy pubsub