User:Lionel.rowe/redirect-mobile-if-user-agent-desktop.js

{

const isMobile = => window.navigator.userAgent.includes('Mobi')

if (!isMobile) { const url = new URL(window.location) const desktopHost = url.host .split('.') .filter(x => x !== 'm') .join('.') if (url.host !== desktopHost) { url.host = desktopHost window.location = url } }

}