Create new javascript code for media field in chimera