diff --git a/scripts/content/newznab.js b/scripts/content/newznab.js index eac3eb9..1e6f166 100644 --- a/scripts/content/newznab.js +++ b/scripts/content/newznab.js @@ -63,6 +63,22 @@ }); } + if ($('a.addSABnzbd').length == 0) { + // Cover view: For use in te Bootstrap theme + $('div.movcover').parent().parent().each(function() { + var $dr = $(this); + $("a.downloadnzb", $dr).each(function() { + var href = $(this).attr("href"); + var insertLoc = $($(this).parent().parent().parent().parent().parent().children()[1]).children()[0] + $(insertLoc).before('
') + }); + $dr.find('a.addSABnzbd').on('click', function() { + addOne($(this).closest('div')); + return false; + }); + }); + } + if ($('a.addSABnzbd').length == 0) { // List view: Loop through all the td.check items and add a one-click link next the nearby title $('td.check').each(function() { @@ -76,6 +92,19 @@ }); } + if ($('a.addSABnzbd').length == 0) { + // List view: For use in te Bootstrap theme + $('div.data-row').each(function() { + var $dr = $(this); + var href = $dr.find('a.downloadnzb').attr('href') + $dr.find('a.title').parent().prepend('' + oneClickImgTag + ''); + $dr.find('a.addSABnzbd').on('click', function() { + addOne($dr); + return false; + }); + }); + } + if ($('a.addSABnzbd').length == 0) { // Details view (etc.) $('div.icon_nzb').each(function() {