<?php // require detector to get the family, autoloads the $ua var require_once "../../../lib/Detector/Detector.php"; require_once "../../../lib/Detector/lib/helpers/detectorHelper.php"; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Listing</title> <?php echo DetectorHelpers::createJavaScriptObj($ua, "browserFull,isMobile,geolocation,cssanimations,cssgradients,indexeddb"); ?> </head> <body> <p>An example of listing Detector properties via JS:</p> <p> <script type="text/javascript"> var m=Detector; for(var f in m){ if(f[0]=='_'){continue;} var t=typeof m[f]; if(t=='function'){continue;} document.write(f+'='+m[f]); if(t=='object'){ document.write('-><br />'); for(var s in m[f]){
<?php // require detector to get the family, autoloads the $ua var require_once "../../../lib/Detector/Detector.php"; require_once "../../../lib/Detector/lib/helpers/detectorHelper.php"; ?> <html class="<?php echo DetectorHelpers::createHTMLList($ua, "isMobile,geolocation,cssanimations,cssgradients,indexeddb", true); ?> "> <head> <title>Demo of Including Detector Features in the HTML Tag</title> </head> <body> View the source and you'll see the HTML tag is modified with the following attributes select attributes:<br /> <br /> <!-- by using true as the last object you're saying you want select UA attributes also shared --> <?php echo DetectorHelpers::createHTMLList($ua, "isMobile,geolocation,cssanimations,cssgradients,indexeddb", true); ?> </body> </html>