Warning: array_merge(): Argument #4 is not an array in /var/www/profile/Profile.php on line 203 Yiibu: Profile Demo

Profile

A pragmatic means (and extremely early release) of determining device features + constraints by the folks @yiibu.

This is Profile's user-facing inspector which can be used for reference when testing on devices. Visit GitHub to download the source or have a look at our Adaptation presentation for a general overview of how Profile works.

Please expect bugs. (Ironically!) currently best viewed on the desktop. Documentation will follow soon.

Title: Generic

id: generic, version: 1.1

Feature(id:type)cloudclient
JSON(json:boolean)n/an/a

Native JSON Object

Test

return !!window.JSON?1:0;
Screen Width(width:number)n/an/a

From window.innerWidth if available, otherwise from screen.width.

Test

return (window.innerWidth>0)?window.innerWidth:screen.width;
Screen Height(height:number)n/an/a

From window.innerHeight if available, otherwise from screen.height.

Test

return (window.innerHeight>0)?window.innerHeight:screen.height;
Colour Depth(clr:number)n/an/a

Get the colour depth of the device display.

Test

return screen.colorDepth;
XMLHttpRequest API(xhr:boolean)n/an/a

Is an XMLHttpRequest object available on this device.

Test

try { xhr = new XMLHttpRequest(); } catch (e) {} try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {} return +(xhr!=null);
HTML5 Video(video:boolean)n/an/a

Support for HTML5 video?

Test

var video = +!!document.createElement('video').canPlayType; if(video){ var v = document.createElement("video"); v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')?video+='-h264':false; v.canPlayType('video/ogg; codecs="theora, vorbis"')?video+='-ogg':false; v.canPlayType('video/webm; codecs="vp8, vorbis"')?video+='-webm':false; } return video;
HTML5 Location API(geo:boolean)n/an/a

Support for HTML5 geo-location API

Test

return +!!navigator.geolocation;
Adobe Flash Player(swf:string)n/an/a

Which version of the Adobe Flash Player (if any) is installed on this device.

Test

try{ try{ var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6'); try { axo.AllowScriptAccess = 'always'; } catch(e) { return '6,0,0'; } } catch(e) {} var v = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1] ; return v.replace(/,/gi, '.'); }catch(e){ try{ if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){ var v = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]; return v.replace(/,/gi, '.'); } }catch(e){} } return '0.0.0';
Web Fonts(font:boolean)n/an/a

Ability to use web fonts.

Test

var sheet, head = document.head || document.getElementsByTagName('head')[0] || docElement, style = document.createElement("style"), impl = document.implementation || { hasFeature: function() { return false; } }; style.type = 'text/css'; head.insertBefore(style, head.firstChild); sheet = style.sheet || style.styleSheet; /* removing it crashes IE browsers */ /* head.removeChild(style); */ var supportAtRule = impl.hasFeature('CSS2', '') ? function(rule){ if (!(sheet && rule)) return false; var result = false; try{ sheet.insertRule(rule, 0); result = !(/unknown/i).test(sheet.cssRules[0].cssText); sheet.deleteRule(sheet.cssRules.length - 1); }catch(e){} return +result; } : function(rule){ if (!(sheet && rule)) return false; sheet.cssText = rule; return +sheet.cssText.length !== 0 && !(/unknown/i).test(sheet.cssText)&&sheet.cssText.replace(/\r+|\n+/g, '').indexOf(rule.split(' ')[0]) === 0; }; return +supportAtRule('@font-face { font-family: "font"; src: "font.ttf"; }');
SVG Graphics(svg:boolean)n/an/a

Are SVG graphics supported?

Test

return +!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1");
HMTL5 Canvas(cvs:boolean)n/an/a

Is HTML5 canvas supported.

Test

var canvas = +!!document.createElement('canvas').getContext; if(canvas){ var c = document.createElement( 'canvas' ).getContext('2d'); typeof c.fillText=='function'?canvas+="-text":false; } return canvas;
Touch Events(touch:boolean)n/an/a

Ability to create TouchEvent listeners.

Test

try{document.createEvent("TouchEvent");return 1;} catch(e){return 0;}
Desktop(desktop:boolean)n/an/a

Desktop browser

Test

n/a
User Agent(ua:string)
CCBot/1.0 (+http://www.commoncrawl.org/bot.html)