viewer.js: remove dead code