From 1b980de1989b8d42f3891f34f78eb9f32100421d Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 14 Oct 2026 20:59:56 +0100 Subject: [PATCH] website: page events (#7721) * website: page events * rename --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> --- website/src/_includes/events.js | 13 +++++++++++++ website/src/_includes/navbar.html | 8 ++++++++ website/src/contact.html | 1 + website/src/crowdfunding.html | 10 ++-------- website/src/file.html | 1 + website/src/invitation.html | 1 + website/src/token.md | 1 + website/src/wefunder.html | 16 ++++++++++++++-- 8 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 website/src/_includes/events.js 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 %} + + + Invest in SimpleX Chat @@ -18,7 +30,7 @@ eleventyExcludeFromCollections: true - +