Home > Web Front-end > JS Tutorial > body text

JS writes plug-in sharing for Google browser chrome

小云云
Release: 2018-01-13 09:17:24
Original
3462 people have browsed it

Many friends are confused when it comes to browser plug-ins. Aren’t plug-ins only used in games? In fact, it is not the case. Today, the editor brings you a browser plug-in written in JS through a small example.

The function implemented by this plug-in is to realize the small function of lottery by brushing the web page floor.

Idea, automatically fill in the content, and then trigger the click event of the button

In the Google console, you can directly enter the js code to execute what you want to execute Action,

According to the above logic, you only need to add a period of timed js to execute the reply task and it will be ok.

The code is as follows


window.setInterval(function(){
window.document.getElementById("textarea").value='我是来参加活动的,我要拿大奖';
window.document.getElementsByName("Submit")[0].click();
},5000);
Copy after login

Related recommendations:

How to implement the Javascript web page to grab red envelope plug-in

The latest tutorial on plug-in video website reporting scheme_QQ Hall

select label simulation/beautification method uses JS plug-in plug-in_jquery

The above is the detailed content of JS writes plug-in sharing for Google browser chrome. 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