mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Update display of combined referrer urls.
This commit is contained in:
parent
f113d0cb34
commit
4ab71c42a6
5 changed files with 17 additions and 8 deletions
|
|
@ -2,6 +2,10 @@ export function removeTrailingSlash(url) {
|
|||
return url && url.length > 1 && url.endsWith('/') ? url.slice(0, -1) : url;
|
||||
}
|
||||
|
||||
export function removeWWW(url) {
|
||||
return url && url.length > 1 && url.startsWith('www.') ? url.slice(4) : url;
|
||||
}
|
||||
|
||||
export function getDomainName(str) {
|
||||
try {
|
||||
return new URL(str).hostname;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue