Created
August 28, 2010 04:46
-
-
Save watagashi/554729 to your computer and use it in GitHub Desktop.
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
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