Greasy Fork is available in English.

Show Python 3 documentation by default

Automatically redirects Python 2 docs to Python 3.

  1. // ==UserScript==
  2. // @name Show Python 3 documentation by default
  3. // @namespace http://jeremejevs.com/
  4. // @author Olegs Jeremejevs
  5. // @description Automatically redirects Python 2 docs to Python 3.
  6. // @match *://docs.python.org/2*
  7. // @version 1.0
  8. // ==/UserScript==
  9.  
  10. var tmp = document.location.pathname.split('/');
  11. tmp[1] = '3';
  12. document.location.replace(document.location.protocol + '//' + document.location.host + tmp.join('/'));