微博疯狂发垃圾微博

测试学习如何用油猴发微博

目前为 2018-08-31 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 微博疯狂发垃圾微博
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.02
  5. // @description 测试学习如何用油猴发微博
  6. // @author zjsxwc
  7. // @match https://weibo.com/*
  8. // @grant none
  9. // @require http://code.jquery.com/jquery-latest.js
  10. // @icon https://weibo.com/favicon.ico
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. console.log("jquery ready");
  15. repeatChar = function (char, times) {
  16. var result = "";
  17. for (var i = 0; i< times; i++) {
  18. result += char;
  19. }
  20. return result;
  21. }
  22. send = function send(){
  23. var btn1 = $('[action-data="title=有什么新鲜事想告诉大家?"]')[0];
  24. console.log(btn1);
  25. if (!btn1) {
  26. return;
  27. }
  28. btn1.click();
  29.  
  30. setTimeout(function(){
  31. var text = $('[node-type="textEl"]')[0];
  32. console.log(text);
  33. if (!text) {
  34. return;
  35. }
  36.  
  37. text.value = repeatChar('我',1800) + Math.random();
  38. text.dispatchEvent(new Event('focus'));
  39.  
  40. setTimeout(function(){
  41. var btn3 = $('[node-type="submit"]')[0];
  42. console.log(btn3);
  43. if (!btn3) {
  44. return;
  45. }
  46. btn3.click();
  47. setTimeout(function(){location.reload();},500);
  48. },300);
  49.  
  50. },300);
  51.  
  52. }
  53. setInterval(send,1000);
  54.  
  55. })();

QingJ © 2025

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