Test
My website was no longer rendering correctly on android... I tarcked it down today to a bug in PhotoSwipe 3.0.5 that I've been using on Android since way back when.
This led me here:
But updating seemed like a pain. Lots of new features I didn't need.
So I looked into mobile debugging (again):
https://stackoverflow.com/questions/22753960/javascript-alert-box-not-displaying-on-android
I added a way to fake out console.log() on mobile.
Then I added a try around the code that was erroring out and a console.log(error.stack) printout the stack.
That led to a line with this regex:
/Android (\d+.\d+)/
Which I tested on: https://regex101.com/
With this: Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.128 Mobile Safari/537.36
from here: https://www.whatismybrowser.com/guides/the-latest-user-agent/chrome
I changed the line to this: /Android (\d+.?\d+)/
It was not matching correctly for version 10, because version 10 has no decimal point in it.
And the bug was fixed.
This led me to creating a page, which reminds me why html sucks...
https://stackoverflow.com/questions/10634494/how-can-i-display-the-href-as-the-text-too
Maybe I'll use pandoc... yeah..
pandoc photoswipe_bug.md -o photoswipe_bug.html
But that produces busted apostrophe's with euro and TM characters showing...
https://stackoverflow.com/questions/21224741/special-characters-not-showing-in-pandoc-html-output
But that breaks the title... so I added this to the top... hackity, hack, hack!
\<meta charset="utf-8" />
https://poleguy.com works on android again!
boom, done.