Home > Article > Web Front-end > How to implement webpage grabbing red envelopes in Javascript
This article describes the principles and ideas of Javascript writing through an example of a web page for grabbing red envelopes. Interested friends can refer to it for reference.
At first, I used Firefox to add the Firebug/YSlow plug-in for analysis, but Firefox could not run custom javascript, and it seemed that I needed to install some plug-ins. So I switched to chrome and found that chrome is pretty good. You can just write javascript and install it as a plug-in.
Taobao also changed the script several times, but of course it was the same every time. I admire the hard-working Taobao programmers who have to work overtime on weekends to revise scripts.
The appendix is a version of the script I wrote. Directly calling
Volcano.BrickRate=1.0; Volcano.Brick.getLottery(KISSY);
KISSY is something similar to JQuery. It took me a long time to figure it out.
After hanging up for 2 days, I only won 50 yuan in total. It is said that the big prizes are all leaked, you know. If Taobao only distributes rewards based on accounts, plug-in scripts are useless, haha.
Second version of script.
// tmall scripts in Chrome // // // ==UserScript== // @name tmall // @namespace google // @author vesor // @description Simple userscript to grasp tmall lottery // @include http://www.tmall.com Volcano.BrickRate=1.0; Volcano.Brick.getLottery(KISSY); //var L = S.DOM.get("#J_Lucky"); //L.click(); if(++tryCount) setTimeout(loopWrapper, 100); } loopWrapper(); console.log("tmall.user.js: Loaded"); } } catch(e) { console.log("Failed loading tmall.user.js"); }
The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.
Related articles:
How to implement WebSocket function using NodeJS
How to obtain node elements using JS
About the use of vue-fontawesome in vue.js
The above is the detailed content of How to implement webpage grabbing red envelopes in Javascript. For more information, please follow other related articles on the PHP Chinese website!