fix pathname

This commit is contained in:
Dym Sohin 2024-06-15 12:14:13 +02:00
parent c655672d00
commit 62bead8ef6
1 changed files with 6 additions and 3 deletions

View File

@ -193,10 +193,13 @@ const fn_output = ( ) =>
if( chk_nowww.checked ) if( chk_nowww.checked )
{ {
// console.log({ u })
u.protocol = 'http'
u.hostname = u.hostname.replace(/^(www\.)+/,'') u.hostname = u.hostname.replace(/^(www\.)+/,'')
u.hostname = u.hostname.replace(/\?$/,'') u.pathname = u.pathname
u.hostname = u.hostname.replace(/index\.html?$/,'') .replace(/\?$/,'')
u.hostname = u.hostname.replace(/\/$/,'') .replace(/index\.html?$/,'')
.replace(/\/$/,'')
} }
if( chk_utm.checked ) if( chk_utm.checked )