Refactor
This commit is contained in:
parent
293efae980
commit
dd4fbd075a
|
@ -117,15 +117,19 @@
|
|||
)
|
||||
}
|
||||
|
||||
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 =
|
||||
url
|
||||
?.replace(/(http)|(https)|[{}:]/g, "")
|
||||
?.replaceAll(".", "_")
|
||||
?.replaceAll("/", " ")
|
||||
?.trim() || inputUrl
|
||||
query.name = cleanUrl(inputUrl)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue