Created
August 5, 2015 13:58
-
-
Save shu8/306d9518e5fdb0dfe1ab to your computer and use it in GitHub Desktop.
Area51 Revisions Link
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 Area 51 example question revisions link | |
// @namespace http://stackexchange.com/users/4337810/ | |
// @version 1.0 | |
// @description Adds a 'revisions' link for Area51 example questions | |
// @author ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/) | |
// @match http://area51.stackexchange.com/proposals/* | |
// @grant none | |
// ==/UserScript== | |
$.each($('.example-question'), function() { | |
$that = $(this); | |
if($(this).find('.example-question-summary a').length > 1) { //if it has been edited (looks for 2 links - one for author, another for editor) | |
var id = $that.find('.post-menu a:eq(0)').attr('href').split('#')[1]; //get the id | |
var revLink = "http://area51.stackexchange.com/posts/"+id+"/revisions"; //make the link | |
$that.find('.post-menu').append('<span class="lsep">|</span><a id="showRevs" href="'+revLink+'">revisions</a>'); //add the link | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment