Vivid XDCC links

Adds XDCC Button

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         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);