User:Aveaoz/AutoMobileRedirect

This script automatically redirects to desktop site when mobile links are opened on desktop. It does not change the behavior on mobile devices (unless desktop mode is enabled).

Installation

Add importScript('User:Aveaoz/AutoMobileRedirect.js'); to your common.js file.

Thanks to

This is a very lazy script and just adds an extra check to User:Þjarkur/NeverUseMobileVersion, and as such most credit goes there. I also based this page on that documentation page.

The mobile device detection logic is based on https://stackoverflow.com/a/7995898/3286892.