妖火一言版自动发吹牛

妖火一言版自动发吹牛,使用一言作为标题

目前为 2024-02-29 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 妖火一言版自动发吹牛
  3. // @namespace yuanter
  4. // @version 1.0.2
  5. // @description 妖火一言版自动发吹牛,使用一言作为标题
  6. // @author yuanter
  7. // @match *://yaohuo.me/games/chuiniu/add*
  8. // @match *://yaohw.com/games/chuiniu/add*
  9. // @match *://*.yaohuo.me/games/chuiniu/add*
  10. // @match *://*.yaohw.com/games/chuiniu/add*
  11. // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js
  12. // @grant none
  13. // @license MIT
  14. // ==/UserScript==
  15.  
  16. (function () {
  17. 'use strict';
  18. //初始默认妖精500,可自行修改
  19. var moren_yaojing = 500;
  20. //初始默认随机妖精范围值500,即范围区间[0,500],可自行修改
  21. var fangwei_yaojing = 500;
  22. //计算公式:500+随机0到500之间数值,如:500+345=835
  23.  
  24.  
  25.  
  26. let hitokotoUrl = "https://v1.hitokoto.cn/"
  27. let one = {};
  28. function getOne(){
  29. $.ajax({
  30. //请求方式
  31. type:'GET',
  32. cache:false,
  33. async:false,
  34. //发送请求的地址以及传输的数据
  35. url:hitokotoUrl,
  36. dataType:"json",
  37. success: function(data){
  38. one = data;
  39. },
  40. error:function(jqXHR){
  41. //请求失败函数内容
  42. console.log('错误原因:',jqXHR);
  43. },
  44. failure:function (result) {
  45. console.log('失败原因:',result);
  46. },
  47. });
  48. return one;
  49. }
  50.  
  51.  
  52. if (document.title.indexOf("密码") == -1) {
  53. if (document.title.indexOf("公开挑战") != -1) {
  54. var toHtml_input = document.getElementsByTagName("input");
  55. console.log(toHtml_input.length);
  56. if (toHtml_input.length != 0) {
  57. //执行获取一言数据
  58. getOne();
  59. //==>随机妖晶(删掉的话,那么默认就是500)
  60. //var yaojing = 500 + Math.ceil(Math.random() * 500);
  61. var yaojing = moren_yaojing + Math.ceil(Math.random() * fangwei_yaojing);
  62. toHtml_input[0].value = yaojing;
  63. if(one.hitokoto != undefined && one.length != 0){
  64. toHtml_input[1].value = one.hitokoto;
  65. toHtml_input[2].value = "来自:" + one.from;
  66. if(one.from_who == undefined || one.from_who == null || one.from_who == ""){
  67. toHtml_input[3].value = "作者:佚名";
  68. }else{
  69. toHtml_input[3].value = "作者:" + one.from_who;
  70. }
  71.  
  72. }else{
  73. //==>随机妖晶(删掉的话,那么默认就是500)
  74. toHtml_input[1].value = "我是吹牛逼大神!";
  75. toHtml_input[2].value = "不是";
  76. toHtml_input[3].value = "当然";
  77. }
  78. //==>随机答案(删掉的话,那么默认就是答案一)
  79. var toHtml_select = document.getElementsByTagName("select");
  80. toHtml_select[0].value = Math.ceil(Math.random() * 2);
  81. //==>随机答案(删掉的话,那么默认就是答案一)
  82. toHtml_input[toHtml_input.length - 1].click();//确定按钮
  83. } else {
  84. setTimeout(function () {
  85. window.location.href = '/games/chuiniu/add.aspx';
  86. }, '2000');
  87. }
  88. } else {
  89. console.log("不该运行");
  90. }
  91. } else {
  92. console.log("输入密码");
  93. }
  94.  
  95.  
  96. })();

QingJ © 2025

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