mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 09:05:36 +01:00
Added website menu view. Fixed pages filter.
This commit is contained in:
parent
d4437427c4
commit
4a689bf294
13 changed files with 100 additions and 85 deletions
|
|
@ -1,15 +1,11 @@
|
|||
export const urlFilter = data => {
|
||||
const isValidUrl = url => {
|
||||
return url !== '' && url !== null && !url.startsWith('#');
|
||||
return url !== '' && url !== null;
|
||||
};
|
||||
|
||||
const cleanUrl = url => {
|
||||
try {
|
||||
const { pathname, search } = new URL(url, location.origin);
|
||||
|
||||
if (search.startsWith('?')) {
|
||||
return `${pathname}${search}`;
|
||||
}
|
||||
const { pathname } = new URL(url, location.origin);
|
||||
|
||||
return pathname;
|
||||
} catch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue