Skip to content

Instantly share code, notes, and snippets.

@alecmev
Created July 18, 2014 12:57
Show Gist options
  • Save alecmev/5109547d31a814b20b15 to your computer and use it in GitHub Desktop.
Save alecmev/5109547d31a814b20b15 to your computer and use it in GitHub Desktop.
Show Python 3 documentation by default
// ==UserScript==
// @name Show Python 3 documentation by default
// @namespace http://jeremejevs.com/
// @author Olegs Jeremejevs
// @description Automatically redirects Python 2 docs to Python 3.
// @match *://docs.python.org/2*
// @version 1.0
// ==/UserScript==
var tmp = document.location.pathname.split('/');
tmp[1] = '3';
document.location.replace(document.location.protocol + '//' + document.location.host + tmp.join('/'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment