You may use the Redirector add-on, available on
Firefox
and
Chrome:
This simple extension allows you to redirect urls using the power of regular expressions.
For example, you can have all mobile Wikipedia urls to open in desktop mode (this is convered in the tutorial below).
For documentation, visit the product home page for a tutorial with this example :
To set up a redirect for mobile Wikipedia urls, enter the following:
From: ^http:\/\/(.*?)\.m\.wikipedia\.org\/(.*)
To: http://$1.wikipedia.org/$2
As another possibility, you could also use the Firefox add-on
Greasemonkey,
available on Chrome under the name of
Tampermonkey.
You could use this
Greasemonkey script which redirects Wikipedia mobile to the desktop version :
// ==UserScript==
// @name wikipedia_desktop_redirect
// @namespace https://jspenguin.org/monkey
// @description Redirect mobile wikipedia to desktop version
// @include http://*.m.wikipedia.org/*
// @include https://*.m.wikipedia.org/*
// @version 1
// @grant none
// ==/UserScript==
var m = /^(https?:\/\/.*)\.m(\.wikipedia\.org\/.*)/.exec(location.href);
if (m) location.href = m[1] + m[2];
1Is it secure? This seem to be some type of JavaScript. May it redirect to malicious website? – Biswapriyo – 2018-05-17T21:00:51.160
Redirector is exactly what I needed, thanks. I changed
http
tohttps
FYI. – Andrew Keeton – 2018-05-17T21:16:29.3831@Biswapriyo: Should be quite secure. AFAIK redirection rules can only be modified by the manual interface. – harrymc – 2018-05-18T06:03:31.130
I think the forward-slashes need to be escaped for Redirector, too, don't they? Besides, great extension and idea! – Arch Linux Tux – 2019-07-29T19:10:39.297