Last active
May 26, 2019 22:19
-
-
Save leakypixel/1b0a30fbdc815016c14264b82172d841 to your computer and use it in GitHub Desktop.
UserScript: Redirect desktop Wikipedia to mobile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name always_mobile_wikipedia | |
// @namespace https://gist.github.com/leakypixel | |
// @description Redirect desktop Wikipedia to mobile | |
// @author leakypixel | |
// @include http://*.wikipedia.org/* | |
// @include https://*.wikipedia.org/* | |
// @version 0.2 | |
// @grant none | |
// ==/UserScript== | |
'use strict'; | |
var m = /^(https?:\/\/[a-z]+)(\.wikipedia\.org\/.*)/.exec(location.href); | |
if (m) { window.location = m[1] + ".m" + m[2] }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment