zoukankan      html  css  js  c++  java
  • 0713淘宝打折怪

    玩玩可以,不要瞎胡搞啊

    //这里开始------
    window.PP=(function(){
        var _getSWF=getSWF;//被拦截的方法
        var randomDelay=[1,3];//这里定义搜索随机间隔
        var buttonId="award_btn";//按钮id
        var timer;//计时器id
        var auto=false;//自动标志位
        //开始拦截方法
        var _showEnd=function(a,b){
            _getSWF("moster").showEnd(a, b);
            _getSWF("moster").showMoster(1);
            myBack(a,b);
        };
        //代理对象
        getSWF=function(){
            return {
                showEnd:_showEnd,
                showMoster:function(a){_getSWF("moster").showMoster(a);},
                showMyCoupon:function(a){_getSWF("moster").showMyCoupon(a);}
            };
        };
        var myBack = function(a,b){
            if(b!=null){
                console.log("红包:"+b);
            }
            if(auto){
                timer = setTimeout(go,getDelay());
            }
        };
        //模拟单击
        var go=function(){
            timer = null;
            var b=document.getElementById(buttonId);
            b&&b.click();
            reSetAward();
        };
        var getDelay=function(){
            var a=Math.random();
            if(a<0.025||(a>0.525&&a<0.55)){
                a=Math.floor(Math.random()*60000);
                console.log("休息:"+a);
                return a
            }
            return randomDelay[0]*1000+Math.floor(a * Math.abs(randomDelay[1]-randomDelay[0])*1000);
        };
        
        var _start=function(){auto=true;go();};
        var _stop=function(){auto=false;};
        return {
            start:_start,
            stop:_stop
        };
    })();
    //这里结束------
    
    //这哥俩是控制台命令
    PP.start();
    PP.stop();

    这次懒得搞界面了,得到红包也在控制台输出好了

  • 相关阅读:
    Matlab中对二维数组排序
    ATL COM对象崩溃问题一例
    CSS样式介绍
    关于php
    BootStrap介绍
    关于base系列的加密解密
    php基础知识
    任务一
    php数组
    【CV学习1】opencvpython:第一,二章
  • 原文地址:https://www.cnblogs.com/ShepherdIsland/p/2590230.html
Copyright © 2011-2022 走看看