zoukankan      html  css  js  c++  java
  • 小米自动砸蛋机器js代码

    02 //地址:http://static.xiaomi.cn/515
    03 //@author:liuzh
    04 //@url:http://blog.csdn.net/isea533
    05 var start = 10000000;
    06 var autoEgg = {
    07     start:function(){
    08         //5秒发布一次
    09         setInterval(this.send,5000);
    10         //5秒点击一次
    11         setTimeout(this.egg,5000);
    12         //3秒检测一下关闭
    13         setInterval(this.close,3000);
    14     },
    15     send:function(){
    16         //填写内容
    17         document.getElementById('commentContent').value = start++;
    18         //发布
    19         $('#sentBtn').click();
    20     },
    21     close:function(){
    22         if($('.unlucky_egg_modal').hasClass('in') || $('.unlucky_egg_modal').css('display')=='block'){
    23             $('a.close').click();
    24         }
    25     },
    26     egg:function(){
    27         //随机敲蛋
    28         $('.egg')[(Math.random()*3).toFixed(0)].click();
    29         setTimeout(function(){
    30             if($('.unlucky_egg_modal').hasClass('in') || $('.unlucky_egg_modal').css('display')=='block'){
    31                 setTimeout(this.egg,1000);
    32             }
    33             else {
    34                 alert('提示!');
    35             }
    36         },3000);
    37     }
    38 }
    39 //开始
    40 autoEgg.start();
  • 相关阅读:
    HTML5 jQuery图片上传前预览
    html5中form表单新增属性以及改良的input标签元素的种类
    PHP邮箱的正则表达式
    PHP手机号码正则表达式
    CSS中设置div垂直居中
    Linux服务器查看内存占用命令
    linux压缩解压文件
    网页是静态还是伪静态?
    帝国cms内容批量替换
    帝国CMS【操作类型】说明详解
  • 原文地址:https://www.cnblogs.com/jamesbd/p/3729922.html
Copyright © 2011-2022 走看看