Skip to content

Instantly share code, notes, and snippets.

@seanbreckenridge
Last active September 5, 2018 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanbreckenridge/495d772a2653d7aaa440d8477807e35c to your computer and use it in GitHub Desktop.
Save seanbreckenridge/495d772a2653d7aaa440d8477807e35c to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name add link to all python versions to favorite tags
// @namespace https://gist.github.com/seanbrecke
// @version 0.2
// @description add a link which takes you your watched tags which takes you to questions for every python version on stackoverflow
// @author You
// @require http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @include /^https?:\/\/stackoverflow\.com\/?(questions)?\/?(tagged)?\/?
// @exclude /^https?:\/\/stackoverflow\.com\/questions\/\d+
// @grant none
// ==/UserScript==
// NOTE: requires you already have python in your watched tags.
(function() {
"use strict";
let original_python_tag = $("#sidebar div.js-watched-tag-list a.post-tag[href='/questions/tagged/python']");
var new_python_tag = $(original_python_tag).clone().attr("href", "https://stackoverflow.com/questions/tagged/python+or+python-2.7+or+python-2.x+or+python-2.6+or+python-2.5+or+python-2.4+or+python-2.3+or+python-2.2+or+python-2.1+or+python-3.x+or+python-3.5+or+python-3.4+or+python-3.6+or+python-3.3+or+python-3.2+or+python-3.1+or+python-3.7?sort=newest").text("python-all").attr("title", "show questions tagged with any python version");
$(original_python_tag).after(new_python_tag);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment