trying new code from http://davidwalsh.name/disable-console#comment-113795