I standardized the coding style accroding to jsLint (http://www.jslint.com/).
Used brackets (http://brackets.io/) for the editing.
Extension behaviour modified. Clicking once brings the "Print" dialog, getting back from print dialog (clicking on 'Cancel' button), restores the page to webMode.