-
-
Save dekz/311000 to your computer and use it in GitHub Desktop.
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
//http://nzbs.org/index.php?action=getnzb&nzbid=307942 | |
function addToSABnzbdFromNZBORG() { | |
// Set the image to an in-progress image | |
var img = chrome.extension.getURL('images/sab2_16_fetching.png'); | |
$(this).find('img').attr("src", img); | |
// Find the newzbin id from the href | |
var url = 'http://nzbs.org/' | |
var nzburl = url.concat($(this).attr('href')); | |
var addLink = this; | |
addToSABnzbd(addLink, nzburl, "addurl"); | |
return false; | |
} | |
$('table a[href*="index.php?action=getnzb&nzbid="]').each(function() { | |
// Change the title to "Send to SABnzbd" | |
var img = chrome.extension.getURL('/images/sab2_16.png'); | |
var href = $(this).attr('href'); | |
var link = '<a class="addSABnzbd" href="' + href + '"><img src="' + img + '" /></a> '; | |
$(this).before(link); | |
// Change the on click handler to send to sabnzbd | |
$('.addSABnzbd').click(addToSABnzbdFromNZBORG); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment