It worked very well for me. Thanks, @timhuang I adapted the modification proposed by @drgaud
function isMobile () { // credit to Timothy Huang for this regex test: // https://dev.to/timhuang/a-simple-way-to-detect-if-browser-is-on-a-mobile-device-with-javascript-44j3 if (/ Android | webOS | iPhone | iPad | iPod | BlackBerry | IEMobile | Opera Mini / i.test (navigator.userAgent)) { return true } else { return false }; };
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It worked very well for me. Thanks, @timhuang
I adapted the modification proposed by @drgaud