Greasy Fork

Greasy Fork is available in English.

Download all torrents on current page nyaa.si

Clicking the link column opens all magnets on page

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Download all torrents on current page nyaa.si
// @namespace    vvrvhxnk.qpe
// @version      0.4
// @description  Clicking the link column opens all magnets on page
// @author       vvrvhxnk.qpe
// @include      *nyaa.si/*
// @grant        GM_addStyle
// ==/UserScript==
GM_addStyle(`
    .hdr-link::after {
        content: "\\f076";
        color: #808080;
        font-size: 0.85em;
		position: absolute;
		top: 12px;
		right: 8px;
		display: block;
		font-family: FontAwesome;
    }
    .hdr-link {
        width: 100px !important;
        cursor: pointer;
    }
`);
(function() {
    $('.hdr-link').attr('title', 'Download all');
    $('.hdr-link').click(function() {
        if (confirm('Are you sure you want to download all magnets on this page?')) {
            $('a[href^="magnet:?xt="]').each(function() {
                url = $(this).attr('href');
                var popout = window.open(url);
                window.setTimeout(function() {
                    popout.close();
                }, 5);
            });
        } else {}
    });
})();