Update display of combined referrer urls.
This commit is contained in:
1 parent
f113d0cb34
commit
4ab71c42a6
5 files changed
+17
-8
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user