美文网首页
如何删微博

如何删微博

作者: cnfeigo | 来源:发表于2017-02-10 12:35 被阅读0次

    官方关闭了借口,批量删除的小工具全部阵亡。用这个脚本可以快一点点:
    ​// ==UserScript==
    // @name Weibored.js
    // @namespace http://vito.sdf.org
    // @version 0.1
    // @description 删除所有微博
    // @author Vito Van
    // @match http://weibo.com/p/*
    // @grant none
    // ==/UserScript==
    'use strict';

    var s = document.createElement("script");
    s.setAttribute("src","https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js");
    s.onload = function(){
    setInterval(function(){
    $('a[title="删除此条微博"]')[0].click();
    $('a[action-type="ok"]')[0].click();
    }, 800);
    }
    document.head.appendChild(s);

    ---------------update 20170920-----------------------

    'use strict';
    var s = document.createElement("script");
    s.setAttribute("src","https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js");
    s.onload = function(){
    setInterval(function(){
    if (document.getElementsByClassName("W_layer_close").length > 0){
    //error
    $('a[action-type="ok"]')[0].click();
    console.log ("error" + document.getElementsByClassName("page S_bg1")[0].text)
    $(".next")[0].click();
    }else{
    var aa = $('a[action-type="delComment"]').length;
    console.log(aa);
    if ( aa > 1){
    $('a[action-type="delComment"]')[0].click();
    $('a[action-type="ok"]')[0].click();
    }else{
    $(".next")[0].click();
    console.log("next page" + document.getElementsByClassName("page S_bg1")[0].text)
    }
    }

    }, 800);
    

    }
    document.head.appendChild(s);

    //倒过来删
    'use strict';
    var s = document.createElement("script");
    s.setAttribute("src","https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js");
    s.onload = function(){
    setInterval(function(){
    var aa = 0;
    if (document.getElementsByClassName("W_layer_close").length > 0){
    $('a[action-type="ok"]')[0].click();
    console.log ("There is error")
    $(".prev")[0].click();
    }else{
    if (Number(document.getElementsByClassName("page S_bg1")[0].text) < 10){
    aa = document.getElementsByClassName("page").length - 2;
    document.getElementsByClassName("page")[aa].click();
    console.log("will go to last");
    }else{
    aa = $('a[action-type="delComment"]').length;
    console.log(aa);
    if ( aa > 0){
    $('a[action-type="delComment"]')[0].click();
    $('a[action-type="ok"]')[0].click();
    }else{
    $(".prev")[0].click();
    console.log(document.getElementsByClassName("page S_bg1")[0].text)
    }
    }
    }
    }, 1200);
    }
    document.head.appendChild(s);

    //只删本页
    'use strict';
    var s = document.createElement("script");
    s.setAttribute("src","https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js");
    s.onload = function(){
    setInterval(function(){
    var aa = 0;
    aa = $('a[action-type="delComment"]').length;
    console.log(aa);
    if ( aa > 0){
    $('a[action-type="delComment"]')[0].click();
    $('a[action-type="ok"]')[0].click();
    }
    }, 1200);
    }
    document.head.appendChild(s);

    相关文章

      网友评论

          本文标题:如何删微博

          本文链接:https://www.haomeiwen.com/subject/zkygittx.html