mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-19 19:46:42 +00:00
Tweak usage page name extraction
This commit is contained in:
parent
c1857dea2d
commit
0e4420ccd6
@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
// Remove identifying information, e.g. pubkeys, event ids, etc
|
// Remove identifying information, e.g. pubkeys, event ids, etc
|
||||||
const getPageName = () =>
|
const getPageName = () =>
|
||||||
location.pathname.slice(1).replace(/(npub|nprofile|note|nevent)[^\/]+/g, (_, m) => `<${m}>`)
|
location.pathname.slice(1).replace(/(npub|nprofile|note|nevent)1[^\/]+/g, (_, m) => `<${m}>`)
|
||||||
|
|
||||||
// Log usage on navigate
|
// Log usage on navigate
|
||||||
const unsubHistory = globalHistory.listen(({location}) => {
|
const unsubHistory = globalHistory.listen(({location}) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user