Done the rebase for you

I have done the rebase from kogmbh/Viewer.js (master) solving the conflicts as best I can.
You can try to submit this ;)