Greasy Fork

Greasy Fork is available in English.

KTXP&dmhyTorrentLinkToMagnet

在极影首页以及搜索页添加一个的绿底白箭头,链接为该资源的磁链;在动漫花园把蓝箭头的链接换成磁链。

当前为 2014-12-09 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name       KTXP&dmhyTorrentLinkToMagnet
// @namespace  http://KTXP&dmhyTorrentLinkToMagnet/
// @version    2.2
// @description  在极影首页以及搜索页添加一个的绿底白箭头,链接为该资源的磁链;在动漫花园把蓝箭头的链接换成磁链。
// @match      http://bt.ktxp.com/*
// @match	   *://share.dmhy.org
// @match	   *://share.dmhy.org/topics/list*
// @license        GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @copyright  2014.01.17, JMNSY
// ==/UserScript==

jQuery().ready(function(){
    var link;
    var switchy;
    if(jQuery(".quick-down").length > 0){
        link = jQuery(".quick-down");
        switchy = 1;
    }
    if(jQuery(".download-arrow[title='種子']").length > 0){
        link = jQuery(".download-arrow[title='種子']");
        switchy = 0;
    }
    link.each(function(){
        temp = jQuery(this).clone();
        str = jQuery(this).attr("href");
        var words = str.split("/");
        torrent = words[words.length - 1];
        hash = torrent.split(".")[0];
        magnet = "magnet:?xt=urn:btih:" + hash;
//      if(switchy == 1)
//          jQuery(this).before(temp.attr("href",magnet));
//      else
            jQuery(this).attr("href",magnet);
    });
});