remove index.html etc from end of urls
This commit is contained in:
parent
97ebb3c802
commit
4ddb8ee852
18
index.html
18
index.html
|
@ -194,6 +194,9 @@ const fn_output = ( ) =>
|
|||
if( chk_nowww.checked )
|
||||
{
|
||||
u.hostname = u.hostname.replace(/^(www\.)+/,'')
|
||||
u.hostname = u.hostname.replace(/\?$/,'')
|
||||
u.hostname = u.hostname.replace(/index\.html?$/,'')
|
||||
u.hostname = u.hostname.replace(/\/$/,'')
|
||||
}
|
||||
|
||||
if( chk_utm.checked )
|
||||
|
@ -209,6 +212,21 @@ const fn_output = ( ) =>
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( chk_utm.checked )
|
||||
{
|
||||
for( [k,v] of u.searchParams.entries() )
|
||||
{
|
||||
// console.log(`'${k}':'${v}'`)
|
||||
if( /^utm_\w+/.test(k)
|
||||
|| /^ref$/i.test(k)
|
||||
)
|
||||
{
|
||||
u.searchParams.delete(k,v)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let arr_output = arr_urls
|
||||
|
|
Loading…
Reference in New Issue