Skip to content

Instantly share code, notes, and snippets.

@hallvors
Created August 30, 2013 08:41
Show Gist options
  • Save hallvors/6387669 to your computer and use it in GitHub Desktop.
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)
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