|
本帖最后由 riskstar 于 2015-10-15 14:53 编辑 2 P; ]% S0 O. \, a. a5 W
- i8 x; e- h/ w6 W; f, x
右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。) X' g' N2 S5 I$ S
- // looping fetch
1 M: a$ i8 B+ a1 L - var once = function(){6 R4 [ K8 @0 @7 X
- // original author: https://v2ex.com/t/2281644 c8 c3 U, {2 ?
- (function(window, document) {
0 t! q* P6 w' G! Q& l5 G( W( Q; N - var interval = 800;
% |% e7 e- h6 k4 d* o - var closeDelay = 200;4 b8 ~, E; W. j- P5 u1 B$ @8 {
- var index = 0;
# L8 s# c9 k6 |- {3 C - var couponLinks;
! Y( ^2 [- h' q7 e# K - var getCoupon = function() {
& H g# q% X: D, } - if (index >= couponLinks.length) {
) z, _0 ?8 f4 K - console.log("领取完毕");% L9 J* {. u) u7 Z, c( N$ D
- window.once();
: L5 S/ Q% w1 m8 Q4 { - return;
8 d) k8 d, B& Y- T7 S - }
4 o' v4 g# A; C% g( p. I+ ?! z. g2 K - var coponLink = couponLinks[index];1 r+ A* {# G M! _
- coponLink.click(); index++;% J/ e/ l! F9 O& X* ]
- console.log("领取 第" + index + " 张");" k; C' K, l* J6 d/ j
- setTimeout(getCoupon, interval);
' |4 o8 I/ z9 M6 H9 V - setTimeout(function() {
) b1 B& R* M& C& ]' T) I7 _ - var close = document.querySelector('.mui-dialog-close');7 y! b% M0 m6 j) ?) }; i
- if (close != null) close.click();
1 O; h2 k. F; x" A - }, closeDelay);8 ^- `9 [+ ~5 R8 x- S9 L0 M
- }, _' m& {9 `; A3 E* T, h/ E w5 r4 e
- var _scrollTop = 0;
- M, k, W* ?" R) ~8 @# Y, H - var _scrollStep = document.documentElement.clientHeight;# G+ I, U9 l* }5 G4 h# i2 l/ G
- var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;' v1 U8 v6 N* Y$ | P- I. N
- var autoScrollDown = setInterval(function() {6 N' Z; Y% j% F1 v$ }# m" ~: C; V
- _scrollTop += _scrollStep;
7 a G- a" M# P- R# b" @; V - if (_scrollTop > _maxScrollTop) {
; l& B! N s7 _ - clearInterval(autoScrollDown);" w9 e g0 c" M/ t3 i5 ^0 q, P( s
- couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');
7 P& x% w) V0 z - console.log("总共:" + couponLinks.length + "条张优惠券待领取..."); Q/ S3 k5 n* E. @* H
- getCoupon();
( h0 K: d3 W* U) n/ E - } else {5 c. h7 L2 ]# Q9 B1 D
- document.body.scrollTop = _scrollTop;
2 p. B" w5 h0 a% N$ Z" k7 e. l - }
2 n: t0 D8 j+ H# i6 k% M b - }, 500);
4 _/ v) G. G2 C - }) (window, document);
" j" e' u7 ~6 b* e N H9 W* w6 u3 i - }
' o& ?) h( U2 s - once();
复制代码
8 o) C2 X/ e5 ]6 w$ ^ 然后领光所有优惠卷了!
% K9 u8 V; Z0 J+ k0 f; `( i I$ a/ R7 n重要提示:一定要先登录天猫再撸
9 o1 t2 L* o8 I- n; {& h! e |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|