Last active
          August 6, 2016 12:10 
        
      - 
      
- 
        Save usrme/07fe0b5c4201f43b6fc3 to your computer and use it in GitHub Desktop. 
    [GreaseMonkey] Force Wikipedia Mobile View
  
        
  
    
      This file contains hidden or 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 Force Wikipedia Mobile View | |
| // @namespace https://github.com/usrme | |
| // @description Forces mobile view on desktop for a better reading experience | |
| // @include http*://*wikipedia.org* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| let uri = window.location.href; | |
| if (uri.indexOf('.m.') === -1) { | |
| let idx = uri.indexOf('wikipedia'), | |
| out = uri.substr(0, idx - 1) + '.m.' + uri.substr(idx); | |
| window.location.href = out; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment