RecoBotón.

Botón para recomendar posts y temas.

目前為 2016-04-01 提交的版本,檢視 最新版本

// ==UserScript==
// @name         RecoBotón.
// @namespace    http://www.taringa.net/Cazador4ever
// @match        http*://www.taringa.net/*
// @include      *://www.taringa.net/posts/*
// @include      *://www.taringa.net/comunidades/*
// @version      2.2
// @description  Botón para recomendar posts y temas.
// @icon http://o1.t26.net/images/favicon.ico
// @copyright    @Cazador4ever
// ==/UserScript==
(function ($) {
    $('.social-bar.social-bar--bottom').append('<center>'+
                                               '<style type="text/css">'+
                                               '#reco {'+
                                               'line-height: 25px;'+
                                               'background-color: #54ab86;'+
                                               '-moz-border-radius: 1em 4em 1em 4em;'+
                                               'width: 100%;'+
                                               'height: 25px;'+
                                               'border: 0px solid #fff;'+
                                               'border-radius: 5em 5em 50em 50em;'+
                                               'text-align: center;'+
                                               '-webkit-transition: all .3s ease-in-out;'+
                                               'transition: all .3s ease-in-out;'+
                                               'cursor: pointer;'+
                                               '}'+
                                               '#reco:hover {'+
                                               'background: #008b4f;'+
                                               '}'+
                                               '</style>'+
                                               '<HR NOSHADE SIZE=5 COLOR=WHITE><a rel="nofollow" id="reco" class="container-post post-social-media share-bt" title="Compartir en Mi Taringa!"><i class="ico-shout icon-shouts" title="Share"></i>&nbsp;&nbsp;<span class="nombre">COMPARTIR EN MI TARINGA!</span></a><img src="https://k61.kn3.net/C/D/5/D/5/3/500.gif" id="loading" width="45" hight="45" style="display:none" /><img src="https://k61.kn3.net/7/B/6/E/4/C/AEA.png" width="45" hight="45" id="listo" style="display:none" /><img src="https://k60.kn3.net/F/2/3/9/A/1/9A1.png" width="45" hight="45" id="error" style="display:none" /></center>');
    $('#reco').on('click', function shout() {
        var link = ''+document.URL+'';
        var $split = link.split('/');
        var urlFinal = $split[$split.length-1];
        var urlReplace = link.replace(urlFinal, "");
        var usuario = $('.user.textlimit.truncate').prop('href').replace(/.*?:\/\/www.taringa.net/, "").substring(1).trim();
        var cont = '['+'['+'['+'['+ usuario +']'+']'+']'+']\n'+'@'+ usuario +'';
        var $loading = $('#loading');
        $("#reco").hide();
        $loading.show();
        $.ajax({
            type    : 'POST',
            dataType: 'json',
            url     : '/ajax/shout/attach',
            data    : {
                url : urlReplace
            },
            success: function(data){
                $loading.hide();
                $('#listo').show();
                $.ajax({
                    type     : 'POST',
                    dataType : 'json',
                    url      : '/ajax/shout/add',
                    data     : {
                        key             : global_data.user_key,
                        body            : cont,
                        privacy         : 0,
                        attachment_type : 3,
                        attachment      : data.data.id

                    } 
                });
            },
            error: function(){
                $('#error').show();
            },
            complete: function(){
                $loading.hide();
                $('.masdiez a').click();
            }
        });
    });
})(jQuery);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址