Do not show the Turbo link in the header if Gears is already being used, props markjaquith, fixes #8276

git-svn-id: https://develop.svn.wordpress.org/trunk@10031 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2008-12-04 06:35:21 +00:00
parent e3c3333f74
commit 7ebc549cc4
3 changed files with 31 additions and 2 deletions
+29
View File
@@ -349,3 +349,32 @@ columns = {
}
})(jQuery);
jQuery(document).ready(function($){
if ( 'undefined' != typeof google && google.gears ) return;
var gf = false;
if ( 'undefined' != typeof GearsFactory ) {
gf = new GearsFactory();
} else {
try {
gf = new ActiveXObject('Gears.Factory');
if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 )
gf.privateSetGlobalObject(this);
} catch (e) {
if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) {
gf = document.createElement("object");
gf.style.display = "none";
gf.width = 0;
gf.height = 0;
gf.type = "application/x-googlegears";
document.documentElement.appendChild(gf);
}
}
}
if ( gf && gf.hasPermission )
return;
$('.turbo-nag').show();
});