Simple pubsub implementation for Chrome extensions