|
本帖最后由 riskstar 于 2015-10-15 14:53 编辑
2 T4 [ ^ `/ H0 K1 L' [# @8 `
; y4 m* }3 R! I% a( ?右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。
2 ?' A* t( W. J$ M0 }+ t1 a& A- // looping fetch! g5 _4 Q3 s8 f- U7 `8 ^* h' {
- var once = function(){
+ K- W! M A8 `! T! i, I4 X - // original author: https://v2ex.com/t/228164
& D1 E8 q! `$ b# d3 M* y& |: D - (function(window, document) {
/ x7 l/ E6 \- e# W - var interval = 800;$ ^4 k, }* U% K
- var closeDelay = 200;' l/ @9 m \+ J. l6 J
- var index = 0;& H0 {3 U M2 j* @+ n
- var couponLinks;' |+ k# W$ d8 w1 m& Y" _
- var getCoupon = function() {- [& | K" O6 J+ K% ]5 T" m
- if (index >= couponLinks.length) {4 ~7 |5 U6 Y! C* `! h. B
- console.log("领取完毕");
4 i V. ?( O; J7 Y% [ - window.once();
3 j Q9 K/ X Z - return;
$ j- ]: K4 W! e$ A) y) X - }
/ F* \6 \) F7 x# i1 [ - var coponLink = couponLinks[index];0 T# o W# _ N' m) S
- coponLink.click(); index++;8 [) n6 w' H/ ^ K x
- console.log("领取 第" + index + " 张");
" X* Y& s$ Y6 X/ h4 ? - setTimeout(getCoupon, interval);
( E% L$ q$ ^# v - setTimeout(function() {
" q+ s: R/ `0 X7 f; {. Z - var close = document.querySelector('.mui-dialog-close');
" s) t, a- [, M# b" B! I3 ` - if (close != null) close.click();
+ O! k) z9 N" t$ V. B& W0 k - }, closeDelay);2 v7 `5 k4 t3 B, `; W* f! N
- }4 a/ B2 y3 g {9 F/ s7 ^
- var _scrollTop = 0;
0 ]+ G1 ^8 t3 @5 D. P - var _scrollStep = document.documentElement.clientHeight;) P: L7 k4 b# o; S
- var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;
7 Z! l7 U& s0 t- A5 c+ v# M+ k( d - var autoScrollDown = setInterval(function() {0 Z( q4 ^; ~' B, C0 H
- _scrollTop += _scrollStep;
" W$ A" O% X/ b2 X' K8 c V - if (_scrollTop > _maxScrollTop) {
; C/ U8 u) v F4 K4 g2 Q - clearInterval(autoScrollDown);
$ s1 l- x# v: n4 K - couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');8 A6 z$ b% n0 f. S& f- v
- console.log("总共:" + couponLinks.length + "条张优惠券待领取...");+ B! |1 R8 @1 L, a
- getCoupon();( t& }, |3 E( S# W% R3 \7 Z
- } else {
, A V% ~+ i9 d& n - document.body.scrollTop = _scrollTop;
7 ]3 \- U( G6 j4 j: f- P - }
8 E" Y, n& T2 r - }, 500);
+ p1 U0 }$ T4 N$ |9 y" D) Z) _6 t% e3 f - }) (window, document);
& u I8 T1 ~. g$ { - }+ s$ p, z- S! S l* Z3 } T! {9 P/ f
- once();
复制代码 ) d! m, N% a0 @7 r- L: a ^
然后领光所有优惠卷了!
6 ]: S0 P2 Q+ g0 `7 D6 f重要提示:一定要先登录天猫再撸 5 m3 ?& S* t; a0 L2 D3 w
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|