Last active
January 8, 2019 14:55
-
-
Save phelma/45c111839dc96bc1456018a584791495 to your computer and use it in GitHub Desktop.
script for viewing mobile wikipedia on desktop
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 Wikipedia Desktop to mobile redirect | |
// @namespace phelm | |
// @version 0.1 | |
// @description Load mobile page on desktop because it is easier to read | |
// @author phelm | |
// @include https://en.wikipedia.org/* | |
// @include http://en.wikipedia.org/* | |
// ==/UserScript== | |
// https://gist.github.com/phelma/45c111839dc96bc1456018a584791495/edit | |
(function() { | |
'use strict'; | |
var newUrl = window.location.toString().replace('en.wikipedia.org','en.m.wikipedia.org'); | |
window.location.replace(newUrl); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
replace (rather than add to) window url, so as to not break back button