Vivid XDCC links

Adds XDCC Button

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Vivid XDCC links
// @namespace    VividXDCC
// @version      1.01
// @description  Adds XDCC Button
// @match        http://hii.aoi-chan.com/*
// @require      http://code.jquery.com/jquery-latest.min.js
// ==/UserScript==

// Set to 1 if you wish to the full filename of the download
var showFullFilename = 0;

function changeLinks()
{
    $(".list li a").each(function()
    {
        var name = $(this).children("span:last").text();
        if (showFullFilename != 1) name = name.substring(name.indexOf(']') + 2, name.length - 18);
        
        var packID = $(this).children("span:first").text();
        packID = packID.trim();
        
        $(this).attr("href", "javascript: var link = prompt('" + name + "', '/MSG Vivid|Hii XDCC SEND " + packID + "');");
        
    });
}

$(".list").bind("DOMSubtreeModified", changeLinks);