diff --git a/website/src/_includes/events.js b/website/src/_includes/events.js new file mode 100644 index 0000000000..c1098da5f1 --- /dev/null +++ b/website/src/_includes/events.js @@ -0,0 +1,13 @@ +var pageEvents = { + domain: 'simplex.chat', + endpoint: 'https://api.simplex.chat/api/event', + logging: false, + outboundLinks: true, + transformRequest: function (event) { + if (window !== window.top || location.hostname.endsWith('.onion')) return null; + if (location.pathname.startsWith('/directory')) event.u = event.u.split('#')[0]; + // remove hash from outbound links + if (event.p && event.p.url) event.p.url = event.p.url.split('#')[0]; + return event; + } +}; diff --git a/website/src/_includes/navbar.html b/website/src/_includes/navbar.html index 6de0c372e3..ab56059931 100644 --- a/website/src/_includes/navbar.html +++ b/website/src/_includes/navbar.html @@ -212,6 +212,14 @@ +{% if not noEvents %} + +{% endif %} + + +