|
|
本帖最后由 riskstar 于 2015-10-15 14:53 编辑 - A. z ]& f4 [) @
8 X7 t- A) Z, ~右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。2 V t. y2 f+ k
- // looping fetch- `9 s$ D$ B/ R; P e
- var once = function(){
5 ~7 P; W" @9 e' q2 w8 n - // original author: https://v2ex.com/t/228164
2 S/ g) G9 ~+ l - (function(window, document) {
9 K' g' r# k1 {# J, a* } - var interval = 800;
% u4 w1 B/ R; |, `$ v! u - var closeDelay = 200;6 m) L6 J, B& q: \* N9 Q
- var index = 0;
) f* W4 l8 z# a- S - var couponLinks;8 B4 {2 l/ A0 M
- var getCoupon = function() {
; D5 g2 T: Z- S: {, c - if (index >= couponLinks.length) {3 c3 w/ ?* d% Z m( ^& y
- console.log("领取完毕");4 @; Q5 D. b8 ]1 F6 i- j
- window.once();
1 M! H! d Z4 {/ I6 }& Z% H- P. K - return;
* C6 ^2 n' z: L- L - }( |% X% v6 B, j- R3 r! d
- var coponLink = couponLinks[index];! C Y4 Z/ D1 F. o
- coponLink.click(); index++;$ i2 k; t/ V# X7 [" x: r, r
- console.log("领取 第" + index + " 张");
: A+ q1 \. y& N2 q6 b - setTimeout(getCoupon, interval);
2 b! C6 z: `8 Z - setTimeout(function() {' |# }" Z8 W, Z0 s- u
- var close = document.querySelector('.mui-dialog-close');$ @& B! F/ D9 B1 n/ g
- if (close != null) close.click();
2 {: j) m) x( B' _+ H) D - }, closeDelay);
6 D7 M6 ^9 V# v! a - }
. m8 C) }( w0 M0 F - var _scrollTop = 0;0 v6 T7 Q' \ k7 t
- var _scrollStep = document.documentElement.clientHeight; p* S3 x: O8 J4 j* D, ^! ]
- var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;; s, i3 r1 [& y5 L6 ^+ r" c
- var autoScrollDown = setInterval(function() {7 S$ R& j( |0 v- N. O
- _scrollTop += _scrollStep;0 h+ S8 O. z' u
- if (_scrollTop > _maxScrollTop) {
' n7 ^/ S( L. e" B$ H( u5 x) ]6 h - clearInterval(autoScrollDown);# j3 d$ g; a% e5 u1 o- L
- couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');
j+ K8 ~. Q R8 k8 C - console.log("总共:" + couponLinks.length + "条张优惠券待领取..."); _. n/ K) ~# m2 X4 [4 d" S l& @5 ^! T u
- getCoupon();
; n( _3 _4 c2 L3 c6 d# A0 A - } else {
\! f' I$ e, U) M( N - document.body.scrollTop = _scrollTop;
+ y. I; x5 Y7 b - }
; V3 K3 C1 Z: q1 x - }, 500);: a1 r' c9 Q6 W* C2 [% r6 q% h
- }) (window, document);: z' t5 t5 ] B+ d8 u/ S
- }! k3 A( v& g1 _* o/ z
- once();
复制代码 # E' N& l0 t7 @! M
然后领光所有优惠卷了! ; o& x8 O7 U) }5 H# Y- @
重要提示:一定要先登录天猫再撸 0 g6 v7 ?: S. p( ]. y
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|