diff --git a/index.html b/index.html index 8036176..c267957 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + @@ -20,6 +20,11 @@ } } catch (e) { } })(); + + // Prevent pinch-to-zoom gesture on iOS devices + document.addEventListener('gesturestart', function (e) { + e.preventDefault(); + }); diff --git a/src/index.css b/src/index.css index 950584b..036f42e 100644 --- a/src/index.css +++ b/src/index.css @@ -43,6 +43,7 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transition: background-color 0.2s ease, color 0.2s ease; + touch-action: pan-x pan-y; } html.dark { @@ -53,6 +54,7 @@ margin: 0; background-color: #F3EDE4; transition: background-color 0.2s ease, color 0.2s ease; + touch-action: pan-x pan-y; } html.dark body { diff --git a/test_version.js b/test_version.js deleted file mode 100644 index c64adf0..0000000 --- a/test_version.js +++ /dev/null @@ -1,29 +0,0 @@ -const { execSync } = require('child_process'); -function getGitVersion() { - try { - try { - execSync('git fetch --tags', { stdio: 'ignore' }); - } catch (e) {} - - const raw = execSync('git describe --tags --always', { stdio: ['pipe', 'pipe', 'ignore'] }) - .toString() - .trim(); - - // Check if it's just a commit hash (no dashes, just hex) - if (/^[0-9a-f]{7,}$/.test(raw)) { - return `v0.0.0-${raw}`; - } - - // It might be tag-commits-hash, e.g., v0.1.1-5-g4a9f6b6 - // Let's shorten it to v0.1.1-4a9f6b6 for a cleaner look, or just return as-is - const match = raw.match(/^(.*)-\d+-g([0-9a-f]+)$/); - if (match) { - return `${match[1]}-${match[2]}`; - } - - return raw; - } catch (e) { - return 'dev'; - } -} -console.log(getGitVersion());