Jump to content

User:Þjarkur/NeverUseMobileVersion.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Þjarkur (talk | contribs) at 12:20, 24 August 2019 (Þjarkur moved page User:Þjarkur/NoMobile.js to User:Þjarkur/NeverUseMobileVersion.js). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
var url = window.location.href

if(url.match(/^https?:\/\/[^.]+\.m\.wikipedia\.org/) && !url.match(/\?/)) {
  url = url.replace(/^(https?:\/\/[^.]+)\.m\./,'$1.')
  window.location.href = url
}