tags: [小技巧]


“有什么黑科技可以批量删除微博?”

不知道为什么要把过往的记录都删掉,可能害怕回首吧。
看了一遍,都基本要付费删除,看来真是一笔生意啊……
就不封装了,直接贴代码↓

  1. 'use strict';
  2. var s = document.createElement('script');
  3. s.setAttribute(
  4. 'src',
  5. 'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js'
  6. );
  7. s.onload = function() {
  8. setInterval(function() {
  9. if (!$('a[action-type="feed_list_delete"]')) {
  10. $('a.next').click();
  11. } else {
  12. $('a[action-type="feed_list_delete"]')[0].click();
  13. $('a[action-type="ok"]')[0].click();
  14. }
  15. // scroll bottom let auto load
  16. $('html, body').animate({ scrollTop: $(document).height() }, 'slow');
  17. }, 800);
  18. };
  19. document.head.appendChild(s);

用法

进入个人中心

类似下面的这个页面↓
image.png

粘贴到console回车运行

image.png

出现错误或自动刷新,重复上述步骤

image.png
⚠️ **注意:此举是直接按顺序去删除微博的,不想这样子搞的,可以在原有基础上做一些元素的判断**