Copy Magnets

Copy magnet links to clipboard

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Copy Magnets
// @namespace    http://rix.li/
// @version      0.3
// @description  Copy magnet links to clipboard
// @author       rix
// @match        *://www.tokyotosho.info/*
// @require      http://code.jquery.com/jquery-latest.js
// @grant        GM_setClipboard
// @grant        GM_log
// ==/UserScript==

var list = $('a[href^=magnet]');
var links = [];

list.each(function(){
    links.push(this.href);
});

list.click(function(e) {
    e.preventDefault();
    GM_setClipboard(this.href, 'text');
});

$('<div style="text-align: center; margin: 20px;"></div>').append(
    $('<button>Copy All</button>').click(function(e){
        GM_setClipboard(links.join('\n'));
        e.preventDefault();
    })
).insertBefore('.listing');