Skip to content

Instantly share code, notes, and snippets.

@cheeaun
Created September 23, 2009 03:10
Show Gist options
  • Save cheeaun/191659 to your computer and use it in GitHub Desktop.
Save cheeaun/191659 to your computer and use it in GitHub Desktop.
Javascript code to check if Chrome Frame is available.
var chromeFrameIsAvailable = (function(){
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('chromeframe') >= 0 || ua.indexOf('x-clock') >= 0) return true;
if (typeof window.ActiveXObject != 'undefined') try {
if (new ActiveXObject('ChromeTab.ChromeFrame')) return true;
} catch(e) {};
return false;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment