You are right that functionality should never be cut, but your mobile check is very bar practice
What if desktop browsers will start to support window.orientation? What about “Use desktop version” checkbox in mobile browsers.
Screen size media query is much better way for the future. It has less false positive mistakes (only if you resize desktop browser to small window, but maybe mobile view is a great option in this case).
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.