Move the httpToGeoUri util into core

This commit is contained in:
ubermanu 2021-03-24 17:05:07 +01:00 committed by JC Brand
parent 3129dd9351
commit 3bfd60a3df
2 changed files with 5 additions and 5 deletions

View File

@ -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.

View File

@ -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)));
};