Reddit greasemonkey script: add Karmadecay links to image description
Code:
// ==UserScript==
// @name Reddit: Karma Decay Integration
// @namespace http://forum.logicalgamers.com/
// @version 1.0
// @description adds a Karma Decay link to reddit image submissions
// @match http://www.reddit.com/*
// @copyright 2013, Charles Stover
// ==/UserScript==
$('a.title[href*="imgur.com/"], a.title[href$="gif"], a.title[href$="jpg"], a.title[href$="png"]').each(
function() {
var $entry = $(this).parent().parent();
$entry.find("ul.buttons").append('<li><a href="http://www.karmadecay.com/' + $entry.find("a.comments")[0].getAttribute("href").replace(/^https?:\/\/(?:www\.)?reddit\.com\//, "") + '" target="_blank">karmadecay<\/a><\/li>');
}
);
Now available in the Downloads section.
Coded in jQuery, since reddit supports jQuery.