NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Mobile Wikipedia for Desktop: A Modern Design
// @namespace wikipedia.org
// @include /^https?://..\.wikipedia\.org/.*$/
// @version 1.3
// @grant none
// @description Open Wikipedia in a better looking mobile mode.
// @Author nascent
// @run-at document-end
// @icon https://www.google.com/s2/favicons?domain=wikipedia.com&sz=128
// @updateURL https://openuserjs.org/meta/nascent/Mobile_Wikipedia_for_Desktop_A_Modern_Design.meta.js
// @downloadURL https://openuserjs.org/install/nascent/Mobile_Wikipedia_for_Desktop_A_Modern_Design.user.js
// @license GPL-3.0-or-later
// ==/UserScript==
(function() {
'use strict';
// Check if we're already in mobile view by looking for the desktop toggle link
var desktopToggle = document.getElementById('footer-places-desktop-toggle');
// If desktop toggle exists, we're already in mobile view, so do nothing
if (desktopToggle) {
return;
}
// Look for the mobile view link
var mobileViewLink = document.querySelector('#footer-places-mobileview a');
if (mobileViewLink) {
// Click the mobile view link
mobileViewLink.click();
}
})();