Switches for swipe-nav and swipe-nav--on-click. Moved detection logic.