Posted By

chrisaiv on 06/22/12


Tagged

nodejs


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

VeXHarbinger


Javascript: User-agent detect GoogleTV or Boxee


 / Published in: JavaScript
 

Simple way to detect GoogleTV or Boxee browsers using Javascript.

  1. //Get the user agent
  2. var userAgent = req.headers["user-agent"];
  3.  
  4. if( userAgent.match(/(Large Screen|GoogleTV|Boxee)/i) ){
  5. //Do something
  6. }

Report this snippet  

You need to login to post a comment.