Skip to main content
1 of 4
pascalhein
  • 211
  • 1
  • 3

View Post Timeline

Inspired by this MSO question.

This tiny userscript will add a link to the timeline for any post, just below the "favorite question" star button.

Example image:

timeline button example

This is the code:

// ==UserScript==
// @name        Add Timeline Button
// @namespace   none
// @description Adds a "View Timeline" Button to StackOverflow
// @include     http://*stackoverflow.com/questions*
// @include     http://*serverfault.com/questions*
// @include     http://*superuser.com/questions*
// @include     http://*stackexchange.com/questions*
// @include     http://*askubuntu.com/questions*
// @include     http://*answers.onstartups.com/questions*
// @include     http://*mathoverflow.net/questions*
// @include     http://discuss.area51.stackexchange.com/questions/*
// @include     http://stackapps.com/questions*
// @author      csharpler
// @version     0.1
// ==/UserScript==

/*
 * Version History
 *      * 0.1 (2013-06-11): First release
 */
 
if(typeof unsafeWindow != 'undefined'){
    $ = unsafeWindow.$;
}

run();

function run(){
    var uri = unsafeWindow.location.href;
    var match = uri.match(/(https?:\/\/[^\/]*\/)questions(\/\d+\/)[a-zA-Z\-]+$/);
    var newuri = match[1] + "posts" + match[2] + "timeline";
    $(".favoritecount").after("<a href='" + newuri + "'>View Timeline</a>");
}

Feel free to submit any bugs, feature requests and comments on the script.

This script was tested with the following settings:

  • Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:20.0) Gecko/20130520 Firefox/20.0 PaleMoon/20.1-x64
  • SO and MSO pages, other SE pages will probably work (please tell me if they don't!)
  • Greasemonkey 1.9
pascalhein
  • 211
  • 1
  • 3