title: Detecting a mobile browser
body: <p>I'm looking for a function that returns a boolean value if the user is using a mobile browser or not.</p>
  <p>I know that I can use <code>navigator.userAgent</code> and write that function by using regex, but user-agents are too various for different platforms. I doubt that matching all possible devices would be easy, and I think this problem has been solved many times so there should be some kind of complete solution for such a task.</p>
  <p>I was looking at <a href="http://detectmobilebrowsers.com" rel="nofollow noreferrer">this site</a>, but sadly the script is so cryptic that I have no idea how to use it for my purpose, which is to create a function that returns true/false.</p>