Skip to content

Instantly share code, notes, and snippets.

@watagashi
Created August 28, 2010 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save watagashi/554729 to your computer and use it in GitHub Desktop.
Save watagashi/554729 to your computer and use it in GitHub Desktop.
registerPlugin({
init: function() {
if(!navigator.geolocation) {
try {
navigator.geolocation = google.gears.factory.create("beta.geolocation");
} catch(e) {
// Not found Gears.
}
}
}
});
if(!navigator.geolocation) {
var gearsInit = document.createElement("script");
gearsInit.src = "http://code.google.com/intl/ja/apis/gears/gears_init.js";
gearsInit.type = "text/javascript";
document.body.appendChild(gearsInit);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment