delete-sina-weibo-posts

删除所有微博,需要进入个人页面才会触发;删除微博代码取自:https://gist.github.com/mariotaku/e00b6b93663f2f420ef9

  1. // ==UserScript==
  2. // @name delete-sina-weibo-posts
  3. // @namespace https://ox0spy.github.io/
  4. // @version 0.2
  5. // @description 删除所有微博,需要进入个人页面才会触发;删除微博代码取自:https://gist.github.com/mariotaku/e00b6b93663f2f420ef9
  6. // @author ox0spy
  7. // @match https://weibo.com/*/profile*
  8. // @match https://www.weibo.com/*/profile*
  9. // @match https://weibo.com/*/profile*
  10. // @match https://www.weibo.com/*/profile*
  11. // @match https://weibo.com/p/*
  12. // @match https://www.weibo.com/p/*
  13. // @compatible chrome 支持
  14. // @run-at document-idle
  15. // @grant none
  16. // ==/UserScript==
  17.  
  18. 'use strict';
  19.  
  20. window.setTimeout(deletePosts,1000 * 3);
  21.  
  22. function deletePosts() {
  23. var http = new XMLHttpRequest();
  24. var anchors = document.getElementsByTagName("div");
  25. var i = 0;
  26. for (i = 0; i < anchors.length; i++) {
  27. // 找到有mid属性的div元素
  28. var mid = anchors[i].getAttribute("mid");
  29. if (mid) {
  30. console.log("Deleting " + mid);
  31. // 这是微博的删除接口
  32. var url = "/aj/mblog/del?ajwvr=6";
  33. var params = "mid=" + mid;
  34. http.open("POST", url, false);
  35. //Send the proper header information along with the request
  36. http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  37. http.send(params);
  38. }
  39. }
  40.  
  41. window.location.reload();
  42. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址