本帖最后由 riskstar 于 2015-10-15 14:53 编辑 ( x( k; B, u' z# Z) q
! a% a0 F; A# U; Z6 ~
右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。& }" @- _" y1 n! C
- // looping fetch
' [* b: r* M- {, k% j - var once = function(){# ]) b1 C* G9 Y' g9 J! C
- // original author: https://v2ex.com/t/228164
* d% b' {% o) _7 q) d! X7 d! Z$ b - (function(window, document) {9 i8 `4 c, ]) [9 t% t! U
- var interval = 800;, S; [7 i( q$ S- D* N6 v. M
- var closeDelay = 200;+ L5 P) u+ ~8 l @ z9 f. k
- var index = 0;
1 K$ P, Y$ f3 r" @' ] - var couponLinks;
% @. Y$ L4 f2 ?; P0 g0 Y! D+ e - var getCoupon = function() {
+ k1 Z% ?. Y$ K2 E - if (index >= couponLinks.length) {" R% O6 y, S2 F# r; z4 s
- console.log("领取完毕");4 {' j7 n/ Q5 Q' i
- window.once();
8 r( I( [: d2 v+ `5 r. Z - return;3 U, n# e0 x" x% a6 C( y
- }3 {: c- H4 j5 W3 C9 [
- var coponLink = couponLinks[index];
7 L$ ~/ l8 v% S5 c- { - coponLink.click(); index++;3 h- i* H7 x ~5 e$ [9 A* |4 e
- console.log("领取 第" + index + " 张");- X2 a* s/ x% o. w6 N( Y1 ^
- setTimeout(getCoupon, interval);4 \. b8 r- b) m* N
- setTimeout(function() {, v0 E3 F' b/ v6 h& J$ E, f! @1 o
- var close = document.querySelector('.mui-dialog-close');0 h5 u7 e! U. B, u9 k7 C
- if (close != null) close.click();
; R2 K0 o& j `& l. x - }, closeDelay);" V% g0 H6 F+ Q+ R- }
- }
% e- ]; c& ?" m' b: n) O5 F - var _scrollTop = 0;
- l3 m, s- b. J y! O1 X- b - var _scrollStep = document.documentElement.clientHeight;
0 w* e) }) f+ v* h& ?/ S" R - var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;
' z6 B& L; P5 X' l - var autoScrollDown = setInterval(function() {
% }! v9 x. o) F! M, [* m5 P - _scrollTop += _scrollStep;4 g5 w1 f% }/ T: C. R
- if (_scrollTop > _maxScrollTop) {
5 U# _ l, C8 @* \ S: ~ - clearInterval(autoScrollDown);
3 r3 C7 C5 J( M4 l' s/ J7 h - couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');* ~, R1 ?! N& y! Z, K
- console.log("总共:" + couponLinks.length + "条张优惠券待领取...");
1 I# h4 E/ }: r7 D0 D - getCoupon();
' o; n6 i/ |" G- @ - } else {
4 R2 w- y# O @9 ~* ]: z$ T, o0 d - document.body.scrollTop = _scrollTop;
, b9 r( Y% T v! u- x: n - }
) W$ O/ b6 Z T( v+ ~ - }, 500);
9 v+ @ O2 F9 ] C - }) (window, document);
7 u. p6 b! y: A* t5 G. V - }6 q1 U3 D8 x8 x: Y4 M' U
- once();
复制代码 2 ]) j, Q; Y5 w1 ^/ \7 e) p% h$ c
然后领光所有优惠卷了!
2 {7 E; a2 C+ c- l重要提示:一定要先登录天猫再撸
1 j1 Y+ b* T% w. I" a |