diff --git a/arthur.html b/arthur.html index 85f72a8..c34f48e 100644 --- a/arthur.html +++ b/arthur.html @@ -3,7 +3,7 @@ Arthur: The Quest for Excalibur - + diff --git a/interface.js b/interface.js index 954eab8..1b617e4 100644 --- a/interface.js +++ b/interface.js @@ -6,18 +6,20 @@ const textinput_elem = document.getElementById('textinput') // Prevent iOS from zooming in when focusing input, but allow Android to still pinch zoom // As they handle the maximum-scale viewport meta option differently, we will conditionally add it only in iOS // Idea from https://stackoverflow.com/a/62750441/2854284 -if (/iPhone OS/i.test(navigator.userAgent)) { - document.head.querySelector('meta[name="viewport"]').content = 'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1' -} +/* document.addEventListener('DOMContentLoaded', (event) => { + if (/iPhone OS/i.test(navigator.userAgent)) { + document.head.querySelector('meta[name="viewport"]').content = 'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1' + } +}) */ -visualViewport.addEventListener('resize', () => { +/* visualViewport.addEventListener('resize', () => { const height = visualViewport.height document.documentElement.style.height = `${height}px` // Safari might have scrolled weirdly, so try to put it right window.scrollTo(0, 0) setTimeout(() => window.scrollTo(0, 0), 500) -}) +}) */ // Mobile input event handlers canvas_elem.addEventListener('touchstart', ev => { @@ -74,7 +76,7 @@ textinput_elem.addEventListener('keyup', ev => { }) // Arthur buttons -const arthurmodes = document.getElementById('arthurmodes') +/*const arthurmodes = document.getElementById('arthurmodes') if (arthurmodes) { arthurmodes.addEventListener('click', ev => { let target = ev.target @@ -86,7 +88,7 @@ if (arthurmodes) { } textinput_elem.focus() }) -} +}*/ // Send a fake keydown/keyup const named_codes = {