Greasy Fork

Greasy Fork is available in English.

Copy link

Copy important link in text area

当前为 2016-01-30 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Copy link 
// @namespace   Sality
// @description Copy important link in text area
// @include     *kat.cr/*
// @version     0.3 Beta
// @grant       none
// ==/UserScript==


    
try{
    
    
   var pathname = window.location.pathname;
    //Spam Testing script -----------------------------------------------------------------------------------------------------------------------------------------------
    
    if ((pathname.indexOf('\/user\/') != 0)&&(pathname.indexOf('\/community\/') != 0)){
    if ($('div.mainpart table.data').length) {
        
        $('div.mainpart table.data .torrentname ').each(function(){
            var link = pathname.protocol + '//' + pathname.host +$('a.cellMainLink',$(this)).attr('href');
            $(this).before('<i title="Copy Link" class="ka ka16 ka-pin sality" style="float:right;"></i>');
                              
        });
        addtextarea();  
}
}
    
    
    function addtextarea(){
        $('.mainpart [class="pages botmarg5px floatright"]').after('<textarea class="botmarg5px quicksubmit" name="content" rows="10" cols="" id="salityx"></textarea>');
    }
    function addLink(url){
        $('#salityx').val($('#salityx').val()+url+"\n");
    }
    //<textarea class="botmarg5px quicksubmit" name="content" rows="10" cols="" id="replytext"></textarea>
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    $('div.mainpart table.data .sality').click(function(){
        var $temp =$(this).parent();
        var url =window.location.protocol + '//' + window.location.host +$('.torrentname a.cellMainLink',$temp).attr('href');
            addLink(url);
    });
    
}//try end
    catch(ex){
        console.log("Error IN script /Page . Inform Sality");
        }