ClonPost

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

当前为 2016-02-27 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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