Update viewer.js

Replaced mime-registration, little fixes