zoukankan      html  css  js  c++  java
  • 天猫优惠券领取

      11.11快到了,优惠券一个个拿真的不是我想要的好么!

    复制下面的代码,打开天猫登录 -》 F12  -》  console -》 把代码Copy到空白的地方 -》 回车!

    (function(window, document, undefined) {
    var interval = 800;
    var closeDelay = 200;
    var index = 0;
    var couponLinks;
    var getCoupon = function() {
    if (index >= couponLinks.length) {
    console.log("领取完毕");
    return;
    }
    var coponLink = couponLinks[index];
    coponLink.click(); index++;
    console.log("领取 第" + index + " 张");
    setTimeout(getCoupon, interval);
    setTimeout(function() {
    var close = document.querySelector('.mui-dialog-close');
    if (close != null) close.click();
    }, closeDelay);
    }
    var _scrollTop = 0;
    var _scrollStep = document.documentElement.clientHeight;
    var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;
    var autoScrollDown = setInterval(function() {
    _scrollTop += _scrollStep;
    if (_scrollTop > _maxScrollTop) {
    clearInterval(autoScrollDown);
    couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');
    console.log("总共:" + couponLinks.length + "条张优惠券待领取...");
    getCoupon();
    } else {
    document.body.scrollTop = _scrollTop;
    }
    }, 500);
    }) (window, document);

    代码原文链接

  • 相关阅读:
    2020-03-1811:29:37springboot与任务
    2020-03-17 20:18:50springboot整合rabbitmq
    2020.03.17 springboot缓存相关
    前端JS面试
    npm 常用指令
    ES8新特性
    ES7新特性
    ES6新特性
    SpringBoot
    SpringBoot
  • 原文地址:https://www.cnblogs.com/yccmelody/p/5983436.html
Copyright © 2011-2022 走看看