Refactor
This commit is contained in:
parent
293efae980
commit
dd4fbd075a
|
@ -117,15 +117,19 @@
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkQueryName(inputUrl = null) {
|
function cleanUrl(inputUrl) {
|
||||||
if (query && (!query.name || query.flags.urlName)) {
|
return (
|
||||||
query.flags.urlName = true
|
|
||||||
query.name =
|
|
||||||
url
|
url
|
||||||
?.replace(/(http)|(https)|[{}:]/g, "")
|
?.replace(/(http)|(https)|[{}:]/g, "")
|
||||||
?.replaceAll(".", "_")
|
?.replaceAll(".", "_")
|
||||||
?.replaceAll("/", " ")
|
?.replaceAll("/", " ")
|
||||||
?.trim() || inputUrl
|
?.trim() || inputUrl
|
||||||
|
)
|
||||||
|
}
|
||||||
|
function checkQueryName(inputUrl = null) {
|
||||||
|
if (query && (!query.name || query.flags.urlName)) {
|
||||||
|
query.flags.urlName = true
|
||||||
|
query.name = cleanUrl(inputUrl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue