|
|
本帖最后由 riskstar 于 2015-10-15 14:53 编辑
4 J4 C! G3 Y1 Y2 g3 Y1 i- L4 P7 q1 L
右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。
; F( n! B h- O$ Z- // looping fetch
7 B. x) g- b7 b3 P) ~4 P. L - var once = function(){
) Y3 f' D0 @" `: z& ^$ F1 {6 J1 O - // original author: https://v2ex.com/t/228164
# D- L/ y. U: ?8 m# I$ ?, J - (function(window, document) {
2 ^0 K1 n' Q; H7 E - var interval = 800;, ^6 _9 E. P$ M5 x) ?0 V4 Q: b4 L: m
- var closeDelay = 200;
' H: x6 v" _* u: ? - var index = 0;
/ t5 G6 g, ~5 U7 B" Q - var couponLinks;
* Y+ f. d u0 R - var getCoupon = function() {* I3 i0 t/ ?3 c& N
- if (index >= couponLinks.length) {
, G; N. V: U: @# D - console.log("领取完毕");
+ u( Q" W5 A4 w7 [' d& I9 A - window.once();9 v& S4 s1 _9 r. U$ n
- return;
0 `6 N5 y! X' q: r, B - }7 \6 e6 ]9 f8 A- D, }: |
- var coponLink = couponLinks[index];
: v, p# [8 N; M! A V - coponLink.click(); index++;0 M. d: m9 f% t- j( ^/ g
- console.log("领取 第" + index + " 张");; u. x0 M6 ^+ k) g7 ^' M$ N
- setTimeout(getCoupon, interval);
) l% S5 p: {9 Y s - setTimeout(function() {! Y% T0 D; Q3 t: J5 n. b7 s6 b
- var close = document.querySelector('.mui-dialog-close');. o0 F" f6 ~1 d6 x# I l
- if (close != null) close.click();6 V7 n3 }8 d7 D1 R2 Y- O5 A. c) ^
- }, closeDelay);2 ~5 v* T% v) E9 ^
- }. Z! E4 d& o' D
- var _scrollTop = 0;! m \5 {0 M/ Q; ^4 y+ c2 |
- var _scrollStep = document.documentElement.clientHeight;$ m! Y1 ^" D/ z+ P4 H# w. O# P2 v
- var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;
& B/ m1 B1 G% H; o* N - var autoScrollDown = setInterval(function() {9 Y5 }% t0 x! `! M( h+ L. f
- _scrollTop += _scrollStep;
* }5 M9 F0 ~' s& Y: Y - if (_scrollTop > _maxScrollTop) {
2 `' M+ X6 k: v - clearInterval(autoScrollDown);
$ K' h0 ]7 A& Y* A- ~% B - couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');7 z9 ~$ y6 \0 P/ q
- console.log("总共:" + couponLinks.length + "条张优惠券待领取...");7 r) ?; t' ]$ B7 r4 g
- getCoupon();8 R9 e8 d2 t9 y: @
- } else {
9 X( Y; n7 W4 `: a F - document.body.scrollTop = _scrollTop;
5 ]) E& B: G, N7 k" U2 ^! m - }$ X A, W, [4 L0 j, V
- }, 500);+ Y) N& Z9 p0 d l8 s4 a$ q4 g2 w; a
- }) (window, document);
0 G, `4 @1 T4 c6 w8 {8 p t% {, ^ - }: }6 O+ q$ q. R7 |
- once();
复制代码 : [. z8 x4 P, d, p {6 M8 b% q
然后领光所有优惠卷了! . b6 v: w( g$ b( X
重要提示:一定要先登录天猫再撸 0 Q3 d% g! q! r. _: J) q* X1 \
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|