User:Itamarcu/common.js

// disables mobile versions of wikipedia pages while I'm on desktop (maybe always? but I think I'm not logged in on my phone) // see https://en.wikipedia.org/wiki/User:%C3%9Ejarkur/NeverUseMobileVersion //      mw.loader.load("https://en.wikipedia.org/w/index.php?title=User:%C3%9Ejarkur/NeverUseMobileVersion.js&action=raw&ctype=text/javascript");

if (!navigator.userAgentData.mobile) if(window.location.href.match(/^https?:\/\/[^.]+\.m\./)) { var desktopUrl = $('#mw-mf-display-toggle').attr('href') if(desktopUrl) { window.location.href = desktopUrl } }