summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-01-16 19:42:32 +0000
committerSarven Capadisli <csarven@status.net>2010-01-24 00:18:05 +0100
commitab53a8704b13a20f8ae885d2b92883e0c7101424 (patch)
tree0b88cafc349008ec87da114d2f44f7f32d303d85 /js
parent414c80a18d6bbcb75e816a5f4ff10d6c54107d41 (diff)
Some JSlint-ing
Diffstat (limited to 'js')
-rw-r--r--js/geometa.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/js/geometa.js b/js/geometa.js
index 6bad095ec..bba59b448 100644
--- a/js/geometa.js
+++ b/js/geometa.js
@@ -1,5 +1,5 @@
// A shim to implement the W3C Geolocation API Specification using Gears or the Ajax API
-if (typeof navigator.geolocation == "undefined" || navigator.geolocation.shim ) (function(){
+if (typeof navigator.geolocation == "undefined" || navigator.geolocation.shim ) { (function(){
// -- BEGIN GEARS_INIT
(function() {
@@ -23,8 +23,7 @@ if (typeof navigator.geolocation == "undefined" || navigator.geolocation.shim )
}
} catch (e) {
// Safari
- if ((typeof navigator.mimeTypes != 'undefined')
- && navigator.mimeTypes["application/x-googlegears"]) {
+ if ((typeof navigator.mimeTypes != 'undefined') && navigator.mimeTypes["application/x-googlegears"]) {
factory = document.createElement("object");
factory.style.display = "none";
factory.width = 0;
@@ -64,8 +63,8 @@ var GearsGeoLocation = (function() {
return function(position) {
callback(position);
self.lastPosition = position;
- }
- }
+ };
+ };
// -- PUBLIC
return {
@@ -112,7 +111,7 @@ var AjaxGeoLocation = (function() {
var queue = [];
var addLocationQueue = function(callback) {
queue.push(callback);
- }
+ };
var runLocationQueue = function() {
if (hasGoogleLoader()) {
@@ -121,18 +120,18 @@ var AjaxGeoLocation = (function() {
call();
}
}
- }
+ };
window['_google_loader_apiLoaded'] = function() {
runLocationQueue();
- }
+ };
var hasGoogleLoader = function() {
return (window['google'] && google['loader']);
- }
+ };
var checkGoogleLoader = function(callback) {
- if (hasGoogleLoader()) return true;
+ if (hasGoogleLoader()) { return true; }
addLocationQueue(callback);
@@ -155,7 +154,7 @@ var AjaxGeoLocation = (function() {
var self = this;
if (!checkGoogleLoader(function() {
self.getCurrentPosition(successCallback, errorCallback, options);
- })) return;
+ })) { return; }
if (google.loader.ClientLocation) {
var cl = google.loader.ClientLocation;
@@ -215,3 +214,4 @@ var AjaxGeoLocation = (function() {
navigator.geolocation = (window.google && google.gears) ? GearsGeoLocation() : AjaxGeoLocation();
})();
+}