mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user