ClonPost

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

Versione datata 27/02/2016. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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;
 
   })();