From: Craig Andrews Date: Fri, 20 Nov 2009 19:46:27 +0000 (-0500) Subject: Fix javascript errors emitted in browsers that do not support w3c geolocation X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b688c572c9dd8a17fcedb40358dd0499357abdab;p=quix0rs-gnu-social.git Fix javascript errors emitted in browsers that do not support w3c geolocation --- diff --git a/js/geometa.js b/js/geometa.js index ced5be0608..9c603ceaee 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() { @@ -94,7 +94,7 @@ var GearsGeoLocation = (function() { } }; -})(); +}); var AjaxGeoLocation = (function() { // -- PRIVATE @@ -208,9 +208,9 @@ var AjaxGeoLocation = (function() { } }; -})(); +}); // If you have Gears installed use that, else use Ajax ClientLocation -navigator.geolocation = (window.google && google.gears) ? GearsGeoLocation : AjaxGeoLocation; +navigator.geolocation = (window.google && google.gears) ? GearsGeoLocation() : AjaxGeoLocation(); })();