That sounds good, but isn't it as easy as moving the contents in `ImageViewer.js` into `extensions/default/ImageViewer/main.js` and adding the register there?