A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

Reddit greasemonkey script: add Karmadecay links to image description

1.3k views · started by GAMEchief ·
#1
Reddit greasemonkey script: add Karmadecay links to image description
// ==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>');
}
);[/0][/href*]


Now available in the Downloads section.

Coded in jQuery, since reddit supports jQuery.
#2
Cool script.

The metadata is bigger than the actual code. xD

Why not post on userscripts site for some visibility?
#3
The OkCupid script is like 10 bytes without the metadata.