fix: paths

This commit is contained in:
Cory Dransfeldt 2024-03-25 10:14:39 -07:00
parent 1d4f9a62b2
commit f1aa80b606
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{
"name": "coryd.dev",
"version": "8.7.5",
"version": "8.7.6",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {

View file

@ -90,7 +90,7 @@
{% endif %}
<noscript>
<style>.client-side {display:none}</style>
<img style="display:none" src="/api/event?page={{ fullUrl | url_encode }}&ns=true" />
<img style="display:none" src="/api/event?site={{ meta.url | url_encode }}&page={{ page.url | url_encode }}&ns=true" />
</noscript>
</head>
<body>

View file

@ -1,5 +1,5 @@
let ignore;
let url = `https://coryd.dev/api/event/?page=${encodeURIComponent(window.location.href)}&lang=${encodeURIComponent(navigator.language)}&nav=${encodeURIComponent(navigator.userAgent)}`
let url = `https://coryd.dev/api/event/?site=${encodeURIComponent(window.location.origin)}&page=${encodeURIComponent(window.location.pathname)}&lang=${encodeURIComponent(navigator.language)}&nav=${encodeURIComponent(navigator.userAgent)}`
if (window.localStorage && window.localStorage.getItem('ignore')) {
ignore = localStorage.getItem('ignore')
url = `${url}&ignore=${ignore}`