新浪微博批量删除文章

2018-02-28  本文已影响33人  WangYatao

js代码

使用方法

将代码复制粘贴到微博主页的控制台

// ==UserScript==
// @name         Weibored.js
// @namespace    http://vito.sdf.org
// @version      0.2.0
// @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() {
    if (!$('a[action-type="feed_list_delete"]')) {
      $('a.next').click();
    } else {
      $('a[action-type="feed_list_delete"]')[0].click();
      $('a[action-type="ok"]')[0].click();
    }

    // scroll bottom let auto load
    $('html, body').animate({ scrollTop: $(document).height() }, 'slow');
  }, 800);
};
document.head.appendChild(s);
上一篇 下一篇

猜你喜欢

热点阅读