Edit Torrent Button (not on sidebar)

Add edit torrent button next to the torrent info.

  1. // ==UserScript==
  2. // @name Edit Torrent Button (not on sidebar)
  3. // @namespace pxgamer
  4. // @version 0.1
  5. // @description Add edit torrent button next to the torrent info.
  6. // @author pxgamer
  7. // @include *kat.cr/*-t*.html
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. var uploader = $('#mainDetailsTable tbody tr td div.font11px.lightgrey.line160perc span.badgeInline span a').text();
  15. var userAccount = $('#navigation li a span.usernameProfile.menuItem').text();
  16. if (uploader == userAccount) {
  17. var editLink = $('[href^="/torrents/edit/"]').attr('href');
  18. $('div.buttonsline.downloadButtonGroup.novertpad').append('<a rel="nofollow" class="kaGiantButton siteButton iconButton" title="Edit Torrent" href="'+editLink+'"><i class="ka ka16 ka-edit"></i></a>');
  19. }
  20. })();