|
|
本帖最后由 riskstar 于 2015-10-15 14:53 编辑
2 U& }' _5 }9 K
1 Z5 q" w8 U* @! C' v- g9 O( W右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。! I' X J4 L' {, w4 c
- // looping fetch9 L) [/ C5 s1 o
- var once = function(){+ |. a# w1 j8 l" a6 u! `" f
- // original author: https://v2ex.com/t/2281642 a0 }2 Y& z; C- i, Z* m4 Y' |& C" r
- (function(window, document) {
1 Y# A% X& p4 D q% j2 E+ q - var interval = 800;
8 u: w6 O+ k4 @& F - var closeDelay = 200;3 Y9 t2 U) @* P( @% S$ }! z% O
- var index = 0;- V" _8 z& l) Z4 U: |
- var couponLinks;( n' n: b0 {1 \7 s
- var getCoupon = function() {4 n2 S: z: ^5 m* R9 _
- if (index >= couponLinks.length) {' W( g& ]0 r: J* V' X0 @. o6 y
- console.log("领取完毕");
0 U* `! C, c L d, |4 e - window.once();
; ~ }& J# o% j$ T - return;
5 W4 \+ X9 H2 a" a - }* t+ S5 X3 M% N- d, i) I5 l
- var coponLink = couponLinks[index];3 n! n; y2 E. M1 i
- coponLink.click(); index++;" G K9 R& U3 B7 f- |& T
- console.log("领取 第" + index + " 张");
4 c0 }( y1 J2 `; d - setTimeout(getCoupon, interval);
! d4 q/ g0 u+ P" z- f - setTimeout(function() {- W# B% r! a1 I5 a
- var close = document.querySelector('.mui-dialog-close');
3 j; Y5 }1 l+ {! n) s - if (close != null) close.click();
9 ]) X+ Z6 s' T - }, closeDelay);7 [1 D8 I% R! n {; [9 K7 C$ d
- }
% [ q5 u$ I# \0 |9 s - var _scrollTop = 0;+ M& i3 P4 y" t) I7 I8 f6 V
- var _scrollStep = document.documentElement.clientHeight;
" j1 r2 f1 V2 b9 m) h! s% p M' F - var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;: A/ o; x5 T3 w& I6 j
- var autoScrollDown = setInterval(function() {
% D; G$ a$ a. I; }5 b( }5 A/ m! [' e - _scrollTop += _scrollStep;, ^) I' o/ q1 P$ o
- if (_scrollTop > _maxScrollTop) {
4 A8 t* O* B4 f8 }" M8 r - clearInterval(autoScrollDown);0 f. }1 a/ H- E
- couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');
$ x/ A& |8 s# T1 l# J - console.log("总共:" + couponLinks.length + "条张优惠券待领取...");5 {4 p0 N! |4 B' G
- getCoupon();
$ s3 s1 I# j! S* F - } else {
! a, L# A, t; l - document.body.scrollTop = _scrollTop;4 r2 @) ^' g5 _* Q f1 U7 s
- }
8 g: |5 q. ?( b - }, 500);0 {. C/ U7 d1 q" e0 |8 Z
- }) (window, document);: Z z3 _5 S$ q4 b* I9 U
- }
3 R5 I2 q2 ~& ], p5 @. \$ y - once();
复制代码
- @6 D0 ]7 k8 w$ f }8 [ 然后领光所有优惠卷了! " V' T. z) s) f4 w5 `. q2 M
重要提示:一定要先登录天猫再撸
; g% ~2 w1 C5 o# P3 s3 i |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|