Batch delete microblogging (reprint)

Author: Vayn

Link: https: //www.zhihu.com/question/23442423/answer/549864289
Source: know almost
copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.


Into the microblogging my home page, right-click Chrome checks, paste the following code in Console
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');
    var len = $('div[action-type="feed_list_item"]').length;
    if (len < 5) { $('a[class="page next S_txt1 S_line1"]')[0].click(); }
  }, 800);
};
document.head.appendChild(s);

And delete Fans:

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="removeFan"]')) {
      $('a.next').click();
    } else {
      $('a[action-type="removeFan"]')[0].click();
       setTimeout(function (){}, 50);
      $('a[action-type="ok"]')[0].click();
    }

    var len = $('li.follow_item').length;
    if (len < 2) {
        $('a[class="page next S_txt1 S_line1"]')[0].click();
    }
  }, 1500);
};
document.head.appendChild(s);

Guess you like

Origin www.cnblogs.com/vocoub/p/11229270.html