ClonPost

Clonador de posts, clona cualquier post solo poniendo la Id. (el famoso repost)

Tính đến 27-02-2016. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name       ClonPost
// @version    0.7
// @description  Clonador de posts, clona cualquier post solo poniendo la Id. (el famoso repost)
// @match      http://www.taringa.net/agregar
// @include     *://*.taringa.net/agregar
// @include     *://*.taringa.net/posts/editar/*
// @copyright  @Cazador4ever
// @namespace http://www.taringa.net/Cazador4ever
// @icon      https://a.fsdn.com/allura/p/taringaapp/icon
// ==/UserScript==
/* jshint -W097 */
'use strict';

(function() {
    var clonar = $('<center><div class="box" Style="background-color:#d9e6f2"><font color="grey"><h5>-| Clonar posts |-</h5></font><input type="text" name="PostId" id="PostId" autocomplete="on" placeholder="Id del post..."><a class="btn g clon" href="#" id="clonarpost">[Clonar]</a></div></div></center>');
    $('#sidebar').prepend(clonar);
    
    
    function clon() {
        $("#clonarpost").css("background","#36BBCE");
        var id = $('#PostId').val();
        var api = 'http://api.taringa.net/post/view/' + id;
        $.getJSON( api, function(json) {
        var body= $('#markItUp').val();
        var a = $('#markItUp');
        var titulo = $('#titulo-input');
        var tit = json.title;
        var d = json.body;
        var c = ''+d+'';
        a.val(body+c).click().focus();
        titulo.val(tit).click().focus();});
       } clonarpost.onclick=clon;
 
   })();