I need some function returning a boolean value to check if the browser is Chrome.
How do I create such functionality?
User could change user agent . Try testing for webkit prefixed property in style object of body element
webkit
style
body
if ("webkitAppearance" in document.body.style) { // do stuff }