Update src/deprecated.js

Determine the browser better way
Do not need to use userAgent