This commit is contained in:
Mel O'Hagan 2023-01-10 16:57:49 +00:00
parent 293efae980
commit dd4fbd075a
1 changed files with 10 additions and 6 deletions

View File

@ -117,15 +117,19 @@
)
}
function checkQueryName(inputUrl = null) {
if (query && (!query.name || query.flags.urlName)) {
query.flags.urlName = true
query.name =
function cleanUrl(inputUrl) {
return (
url
?.replace(/(http)|(https)|[{}:]/g, "")
?.replaceAll(".", "_")
?.replaceAll("/", " ")
?.trim() || inputUrl
)
}
function checkQueryName(inputUrl = null) {
if (query && (!query.name || query.flags.urlName)) {
query.flags.urlName = true
query.name = cleanUrl(inputUrl)
}
}