Home > Web Front-end > JS Tutorial > How to implement red envelope grabbing plug-in in Javascript webpage

How to implement red envelope grabbing plug-in in Javascript webpage

小云云
Release: 2018-01-13 09:15:11
Original
5036 people have browsed it

This article describes the principles and ideas of Javascript writing through an example of a webpage that grabs red envelopes, and teaches you how to implement a Javascript webpage that grabs red envelopes. Friends who are interested can learn from it.

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, which can be directly called


Volcano.BrickRate=1.0;
Volcano.Brick.getLottery(KISSY);
Copy after login

KISSY is something similar to JQuery. It took me a long time to figure it out. Understand.

After hanging up for 2 days, I only won a total of 50 yuan. 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");
}
Copy after login

Related recommendations:

PHP realizes shaking nearby red envelopes

How to imitate WeChat and grab red envelopes

Sharing the development ideas of php generating WeChat red envelopes

The above is the detailed content of How to implement red envelope grabbing plug-in in Javascript webpage. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template