Rework mobile device detection

This commit is contained in:
2026-04-06 15:35:46 -07:00
parent e640e87d3f
commit db46f7d6ba
10 changed files with 19 additions and 10 deletions

View File

@@ -40,7 +40,7 @@ const ogImage = "https://timmypidashev.dev/og-image.jpg";
handleFocus={false}
/>
<script is:inline>
if (window.innerWidth < 1024) {
if (window.innerWidth < 1024 || navigator.maxTouchPoints > 0) {
document.addEventListener('click', function(e) {
var a = e.target.closest('a[href]');
if (a && a.href && !a.target && a.origin === location.origin) {