Edit Torrent Button (not on sidebar)

Add edit torrent button next to the torrent info.

נכון ליום 11-05-2016. ראה הגרסה האחרונה.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Edit Torrent Button (not on sidebar)
// @namespace    PXgamer
// @version      0.1
// @description  Add edit torrent button next to the torrent info.
// @author       PXgamer
// @include      *kat.cr/*-t*.html
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var uploader = $('#mainDetailsTable tbody tr td div.font11px.lightgrey.line160perc span.badgeInline span a').text();
    var userAccount = $('#navigation li a span.usernameProfile.menuItem').text();
    if (uploader == userAccount) {
        var editLink = $('[href^="/torrents/edit/"]').attr('href');
        $('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>');
    }
})();