]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - js/util.js
Some JS cleaning up for NoticeLocationAttach (which fixes also fixes a
[quix0rs-gnu-social.git] / js / util.js
index a10e9d15ae313766951237ddb8d6aba84f56a4a6..aeec8d89d79b9b891694ced9ed68c15bb22a7686 100644 (file)
@@ -494,7 +494,7 @@ var SN = { // StatusNet
                 $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled');
             }
 
-            function getJSONgeocodeURL(geocodeURL, data, position) {
+            function getJSONgeocodeURL(geocodeURL, data) {
                 $.getJSON(geocodeURL, data, function(location) {
                     var lns, lid;
 
@@ -509,7 +509,7 @@ var SN = { // StatusNet
                     }
 
                     if (typeof(location.name) == 'undefined') {
-                        NLN_text = position.coords.latitude + ';' + position.coords.longitude;
+                        NLN_text = data.lat + ';' + data.lon;
                     }
                     else {
                         NLN_text = location.name;
@@ -571,7 +571,7 @@ var SN = { // StatusNet
                                             token: $('#token').val()
                                         };
 
-                                        getJSONgeocodeURL(geocodeURL, data, position);
+                                        getJSONgeocodeURL(geocodeURL, data);
                                     },
 
                                     function(error) {
@@ -593,12 +593,12 @@ var SN = { // StatusNet
                             else {
                                 if (NLat.length > 0 && NLon.length > 0) {
                                     var data = {
-                                        'lat': NLat,
-                                        'lon': NLon,
-                                        'token': $('#token').val()
+                                        lat: NLat,
+                                        lon: NLon,
+                                        token: $('#token').val()
                                     };
 
-                                    getJSONgeocodeURL(geocodeURL, data, position);
+                                    getJSONgeocodeURL(geocodeURL, data);
                                 }
                                 else {
                                     removeNoticeDataGeo();