Created
September 23, 2009 03:10
-
-
Save cheeaun/191659 to your computer and use it in GitHub Desktop.
Javascript code to check if Chrome Frame is available.
This file contains hidden or 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
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