Created
August 30, 2013 08:41
-
-
Save hallvors/6387669 to your computer and use it in GitHub Desktop.
One example of adding specific FirefoxOS detection to isSupportedHTMLDevice() (this is not recommended)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brightcove.isSupportedHTMLDevice=function(pUAString){ | |
var types=["iPad","iPhone","iPod","android","Silk","Mozilla\\/\\d+\\.\\d+\\(Mobile"]; | |
var numTypes=types.length; | |
var uaString=pUAString||brightcove.userAgent; | |
for(var i=0; | |
i<numTypes; | |
i++){ | |
if(uaString.match(new RegExp(types[i],"i"))){ | |
return true; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment