Create hsdomain.js

copied from https://github.com/phormanns/hostsharing-play/tree/master/library