|
本帖最后由 riskstar 于 2015-10-15 14:53 编辑
, d0 S$ a4 A J& L( ?: }- m! F% e5 j/ d' ~/ G8 i! \6 U& O
右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。; ~3 Z, N% ^' r3 k
- // looping fetch
j9 n# N* V1 q$ Y2 ^ - var once = function(){
- x! {% k) B+ T - // original author: https://v2ex.com/t/228164; k" Z2 R) n& R% i3 {# t3 v5 q
- (function(window, document) {
7 R$ F9 ^' i5 d* W - var interval = 800;
1 h2 m# {- R- H- ^7 D! l - var closeDelay = 200;1 o: M" l7 k' K3 T% K
- var index = 0;
3 W: W6 m7 Y# k3 q6 N6 s - var couponLinks;
: C3 M: R' _/ y; U( ]: M - var getCoupon = function() {! e- B( Y" V) h/ T
- if (index >= couponLinks.length) { w3 E0 ?% D: G: e, b5 o% @
- console.log("领取完毕");
7 C! k/ f R, d - window.once();
8 Q) g# I4 z3 ^ - return;4 g% ]& i) B6 J( o5 q) u
- }: I; q' E \; k( A5 S
- var coponLink = couponLinks[index];+ s0 h' f+ u+ O, J
- coponLink.click(); index++;: g' S4 {4 H( S/ b$ d5 ]- A" W) ~
- console.log("领取 第" + index + " 张");! T2 z; h8 p/ d- t! V9 N' V: Y2 |+ a
- setTimeout(getCoupon, interval);
- K/ K; L) \) h6 a! t7 d - setTimeout(function() {/ f0 \: \& R0 A( j% y/ t' G9 u: x! d
- var close = document.querySelector('.mui-dialog-close');, s" n5 G$ M" `) A5 y+ I
- if (close != null) close.click();3 c5 T) W, @ s1 Y! x$ r
- }, closeDelay);
9 K: k# n+ |4 M5 M+ D - }
9 f) D- j# p8 P$ ?% h - var _scrollTop = 0;; e# ], \( X) d7 c2 k/ T) o! C
- var _scrollStep = document.documentElement.clientHeight;$ R: J6 P5 y+ `: u% _: h
- var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;
3 ], Y! i7 u# h' Q0 P! l - var autoScrollDown = setInterval(function() {2 J' M9 |9 r* J+ d
- _scrollTop += _scrollStep;
5 s! n& S6 `2 |! d1 R. ~ - if (_scrollTop > _maxScrollTop) {
; y$ I6 X c- I- L; H& ]- t& f - clearInterval(autoScrollDown);
! J8 ^% B; F+ { e - couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');
1 E/ o& u" e C( _2 W - console.log("总共:" + couponLinks.length + "条张优惠券待领取...");
0 s9 m. M, \) r! A1 K - getCoupon();! v" r% ?" N! q( x' S& t$ p& R s
- } else {
$ s* g/ j) m% \6 ], i4 x) n7 z - document.body.scrollTop = _scrollTop;
8 }7 S+ M' i8 c0 S( Q- A - }: t4 H7 K% M" o/ }
- }, 500);9 i" q! P$ V, m! i
- }) (window, document);
6 G- h- s% l9 K6 h: i( z" Z - }& k L7 R& Y$ M' T: a) t* M
- once();
复制代码
2 H. x* t1 d2 v7 Q 然后领光所有优惠卷了! - @% `$ i: _7 x( ?4 ~/ _
重要提示:一定要先登录天猫再撸
' D7 \7 n% r0 V1 Y% ^; R4 ~ |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|