-
-
Save cauerego/d6382a8952663bb7753f to your computer and use it in GitHub Desktop.
Original source: http://stackapps.com/a/4238/3451 - To install it on Chrome, just use Tampermonkey https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo/
This file contains 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 Stack Exchange Timeline Link | |
// @namespace stackoverflow | |
// @description Add a 'timeline' link to Stack Exchange / Stack Overflow posts - based on http://stackapps.com/questions/2047/add-timeline-and-revisions-links/4238#4238 | |
// @include http*//*stackexchange.com/* | |
// @include http*//*stackoverflow.com/* | |
// @include http*//*serverfault.com/* | |
// @include http*//*superuser.com/* | |
// @include http*//*askubuntu.com/* | |
// @include http*//*mathoverflow.net/* | |
// @include http*//*onstartups.com/* | |
// @include http*//*nothingtoinstall.com/* | |
// @include http*//*seasonedadvice.com/* | |
// @include http*//*stackapps.com/* | |
// @exclude http*//chat*stackexchange.com/* | |
// @exclude http*//chat*stackoverflow.com/* | |
// @exclude http*//api*stackexchange.com/* | |
// @exclude http*//data*stackexchange.com/* | |
// @exclude */reputation | |
// @grant none | |
// ==/UserScript== | |
(function(){ | |
var start=function(){ | |
$(".post-menu").each(function(){ | |
id = $(this).find("a.short-link")[0].href.replace(/^.*\/a\//, "").replace(/\/\d+(?:#.*)?$/, "").replace(/\D+/, ""); | |
rlink = $("<span class='lsep'>|</span><a href='/posts/"+id+"/timeline'>timeline</a>"); | |
$(this).append(rlink); | |
}); | |
}; | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.textContent = "(" + start + ")();"; | |
document.body.appendChild(script); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment