Greasy Fork

来自缓存

Greasy Fork is available in English.

byrpt北邮人一键复制直链

One click to copy the download link!

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         byrpt北邮人一键复制直链
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  One click to copy the download link!
// @author       Wind
// @match        http://*/*
// @include      http*://byr.pt*/details.php*
// @license      MIT
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==


(function() {
    'use strict';
    var download_php;
    $('#outer>table:nth-child(2)>tbody>tr:nth-child(5)> td.rowfollow> a:nth-child(1)').each(function () {
        var rowf=$(this);
        download_php=rowf.attr("href");
    });

    var final_download_link=download_php+"&passkey=手动替换成你的passkey" // 填写你的passkey
    var add_to_page = '&nbsp;|&nbsp;<a title="链接中包含个人秘钥Passkey,切勿泄露!" href="' + final_download_link + '" onclick="return false" id="direct_link" data-clipboard-text="' + 'https://byr.pt/' + final_download_link+'"><b>左键单击复制种子直链</b></a>';

    $('table.mainouter td.outer tr:eq(3) td.rowfollow a:eq(1)').after(add_to_page);

    $('#direct_link').click(function(){
        var dlink = document.getElementById("direct_link");
        var content=dlink.getAttribute('data-clipboard-text');
        var aux = document.createElement("input");
        aux.setAttribute("value", content);
        document.body.appendChild(aux);
        aux.select();
        document.execCommand("copy");
        document.body.removeChild(aux);
        if (message == null) {
            alert("复制成功");
        } else{
            alert("复制失败");
        }
    });
})();