Weibored.js

删除所有微博

  1. // ==UserScript==
  2. // @name Weibored.js
  3. // @namespace http://vito.sdf.org
  4. // @version 0.2.0
  5. // @description 删除所有微博
  6. // @author Vito Van
  7. // @match https?:\/\/weibo.com/p/*
  8. // @grant none
  9. // ==/UserScript==
  10. 'use strict';
  11.  
  12. var s = document.createElement('script');
  13. s.setAttribute(
  14. 'src',
  15. 'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js'
  16. );
  17. s.onload = function() {
  18. setInterval(function() {
  19. if (!$('a[action-type="feed_list_delete"]')) {
  20. $('a.next').click();
  21. } else {
  22. $('a[action-type="feed_list_delete"]')[0].click();
  23. $('a[action-type="ok"]')[0].click();
  24. }
  25.  
  26. // scroll bottom let auto load
  27. $('html, body').animate({ scrollTop: $(document).height() }, 'slow');
  28. }, 800);
  29. };
  30. document.head.appendChild(s);