|
|
本帖最后由 riskstar 于 2015-10-15 14:53 编辑
) ]3 D& P+ u7 B* r; l$ K
2 M$ c; z2 C: B9 G右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。
, u, x- {! ~8 d$ u- // looping fetch2 i% ~" f) c& U& \2 R$ m: @- f
- var once = function(){0 W' \ W( Y2 A. E
- // original author: https://v2ex.com/t/228164
- g! h: f' d4 F) p, {, n2 W5 v4 s - (function(window, document) {% {3 J) K; Y6 b3 Q' G+ t
- var interval = 800;
" P$ H6 z* ~( F3 G: R+ P/ ` - var closeDelay = 200;" E) A7 Y3 N1 x
- var index = 0;, m: q' d* `: i9 [
- var couponLinks;$ k4 g ^# A9 z1 t7 U; t0 f
- var getCoupon = function() {6 z& f7 p- u& `1 c+ f4 d0 \! ?
- if (index >= couponLinks.length) {
* @7 l$ _+ ?- g6 ]0 x3 R: B - console.log("领取完毕");
" T, S5 V& P' y0 \6 o3 K4 k - window.once();" t! }( {7 A9 r% M. y1 G& J
- return;6 e4 W X5 \" W6 m
- }
( ^0 D6 e' ?' ]9 b+ n0 ?" x- r - var coponLink = couponLinks[index];
U5 H o3 [6 Q2 b - coponLink.click(); index++;
' ^5 i3 I+ C2 \8 R) p5 R - console.log("领取 第" + index + " 张");
3 X) J' b4 t) b' T% \- U3 V, q. N - setTimeout(getCoupon, interval);
7 k3 \# n( U1 Q6 W6 M1 q ?/ @ - setTimeout(function() {" c5 F2 q7 S, E+ Q* G
- var close = document.querySelector('.mui-dialog-close');" a, f3 H; c' j, i% ~ d
- if (close != null) close.click();
# v t; W; F, c! Z5 L, d: l. E3 V - }, closeDelay);
0 R h/ w% ?# H! ?4 n) k5 G& D - }+ c6 L7 @" `4 E+ W
- var _scrollTop = 0;) E3 @' Q% P1 i Z4 R5 b8 F: {8 N: I
- var _scrollStep = document.documentElement.clientHeight;% d" Z' w- D! q# m
- var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;$ G1 o. |, R' U9 V* L; E- m
- var autoScrollDown = setInterval(function() {
) L! ~) I3 J; m( c, O4 X9 D - _scrollTop += _scrollStep;
: Q" \3 t+ D- B8 c- w4 T - if (_scrollTop > _maxScrollTop) {# E2 K1 v6 l! U7 V$ `
- clearInterval(autoScrollDown);/ v3 S+ m$ @7 ^7 H; j6 n
- couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');
9 z5 X% ^6 k% S/ b9 B2 c: w - console.log("总共:" + couponLinks.length + "条张优惠券待领取...");
8 R9 S6 Y* _0 a; F - getCoupon();' w8 m* ^. J0 q+ V9 Y+ ?* H
- } else {$ h l" A7 G" h- A
- document.body.scrollTop = _scrollTop;/ s3 I/ b7 J% {- C
- }
' ^1 V9 ^" }& v' u) o - }, 500);
3 { ?. [/ I5 U$ i1 q0 S1 e - }) (window, document);
& G& d" Y2 I& u- J - }4 z* J% M7 ^6 l* C" e# U% z
- once();
复制代码
( M& h1 V+ w3 V. {! v 然后领光所有优惠卷了!
; ?2 l" b: C# b! e! M. G重要提示:一定要先登录天猫再撸
& s3 x7 t* x8 C; p |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|