Home >Web Front-end >JS Tutorial >JS writes plug-in sharing for Google browser chrome

JS writes plug-in sharing for Google browser chrome

小云云
小云云Original
2018-01-13 09:17:243552browse

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);

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!

Statement:
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