|
|
本帖最后由 riskstar 于 2015-10-15 14:53 编辑 5 q- o- T- T) i5 g- k) _
/ d0 ]; M+ ]4 _. p6 M! p" F8 ~2 ]
右键,审查元素 点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。
2 w* z1 m. `5 I/ H7 u* \- // looping fetch
1 C! m/ y! _5 `1 H - var once = function(){
$ o) v t7 {3 j; v1 Y5 q, ?9 b - // original author: https://v2ex.com/t/228164
, p; M1 M# h* X+ e, X5 R - (function(window, document) {; f( _6 n9 u& y8 \
- var interval = 800;% P: E6 {' m# Y* x5 r
- var closeDelay = 200;
7 x% Z z, v" w2 I# F# l - var index = 0;* J8 k, A" A. y# R; e
- var couponLinks;* H8 |/ F5 t. T( c; x- z
- var getCoupon = function() {
! Y3 ], @+ o M% v - if (index >= couponLinks.length) {
( h+ [( P% t/ q7 A9 a5 j/ O; f - console.log("领取完毕");
) |, y" X- L& X7 g) @+ O# D - window.once();' c0 W' ]( A3 S% a9 x5 w7 b
- return;" j5 M( t# Z8 B' a+ g
- }7 F2 U! u0 M3 _( U
- var coponLink = couponLinks[index];
6 y4 v6 U) M M, [ - coponLink.click(); index++;
$ Q% a5 w6 R- b" i) ]7 A* [$ R& I+ [ - console.log("领取 第" + index + " 张");/ R/ b6 u! R) J/ O: L( n5 z
- setTimeout(getCoupon, interval);
+ ^4 }, U1 v3 w4 G. } - setTimeout(function() {
! H' ]5 n8 B5 e7 y+ m! G/ j - var close = document.querySelector('.mui-dialog-close');% P- M8 F" w8 O; h
- if (close != null) close.click();9 g& k; _/ ]5 r/ N( R4 `
- }, closeDelay);
2 B, x# Q* R# P5 J - }
. t( t6 f3 b: Q+ F) x2 t1 T - var _scrollTop = 0;& S: u* T* O' P' U
- var _scrollStep = document.documentElement.clientHeight;2 |# [* N3 N" j2 s3 n1 v
- var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;
, Z/ h6 K4 V+ V( e7 Z - var autoScrollDown = setInterval(function() {8 ?' e6 y: Y0 G/ [* M3 ?
- _scrollTop += _scrollStep;7 S9 j7 t a8 o8 e
- if (_scrollTop > _maxScrollTop) {6 K# e& N7 V" c8 M" [
- clearInterval(autoScrollDown);
! m8 s# W9 h; a2 [) } - couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');$ ~8 W% c4 U+ o
- console.log("总共:" + couponLinks.length + "条张优惠券待领取...");0 p# [- D. l U; z0 ~0 f
- getCoupon();
9 o; ]" B$ w* V - } else {( S* B* r! o* H8 i
- document.body.scrollTop = _scrollTop;0 I+ F6 \: C( `8 j& ~) c
- }
9 X L% \8 r. r$ R+ A+ | - }, 500);
9 v) a) k# _* N; K - }) (window, document);* w9 g" H( F7 n
- }
. X) h# |0 u4 d9 q/ K - once();
复制代码 - r c- Q4 m. O
然后领光所有优惠卷了!
t) U" m( o" T7 j" G重要提示:一定要先登录天猫再撸
4 t2 |# I+ g( Y8 J/ O |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|