Selaa lähdekoodia

Move the httpToGeoUri util into core

ubermanu 4 vuotta sitten
vanhempi
commit
3bfd60a3df
2 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 0
      src/headless/utils/core.js
  2. 0 5
      src/utils/html.js

+ 5 - 0
src/headless/utils/core.js

@@ -528,6 +528,11 @@ u.getUniqueId = function (suffix) {
     }
 }
 
+u.httpToGeoUri = function(text, _converse) {
+    const replacement = 'geo:$1,$2';
+    return text.replace(_converse.api.settings.get("geouri_regex"), replacement);
+};
+
 
 /**
  * Clears the specified timeout and interval.

+ 0 - 5
src/utils/html.js

@@ -356,11 +356,6 @@ u.filterQueryParamsFromURL = function (url) {
     return parsed_uri.removeQuery(paramsArray).toString();
 };
 
-u.httpToGeoUri = function(text, _converse) {
-    const replacement = 'geo:$1,$2';
-    return text.replace(_converse.api.settings.get("geouri_regex"), replacement);
-};
-
 u.slideInAllElements = function (elements, duration=300) {
     return Promise.all(Array.from(elements).map(e => u.slideIn(e, duration)));
 };