User:PlumPear/common.js

/* based on: - https://en.wikipedia.org/wiki/User:%C3%9Ejarkur/NeverUseMobileVersion.js - https://stackoverflow.com/a/7995898/3286892 if (window.location.href.match(/^https?:\/\/[^.]+\.m\./)) { var isMobile = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i); var desktopUrl = $('#mw-mf-display-toggle').attr('href'); if (!isMobile && desktopUrl) { window.location.href = desktopUrl; } }