Youdao Word Add JS implementation automatically read the word

Source: Internet
Author: User

Personal more accustomed to use Youdao, the use of a period of time, the back of the word is very inconvenient and Youdao word customer Duan does not automatically read the function of this dish with a powerful JS to achieve a simple automatic next word function,

Method:
The first step is to open the "\dict\6.3.69.8341\resultui\js\wordbook.js" file under the Youdao path
Add the following code

 //Automatic Next code        varbtnstart = document.getElementById (' btn ')); varTextBox = document.getElementById (' textbox '); varRecord=0; varTime =NULL; if(Btnstart! =NULL) {Btnstart.onclick=function() {                        if(Btnstart.value = = ' Start ' && textbox.value! = ') {timer (); Btnstart.value= ' Stop '; } Else if(Btnstart.value = = ' Stop ') {clearinterval (time); Btnstart.value= ' Start '; }                }        }        functiontimer () { time= SetInterval (function() {                        varMask = document.getElementById (' mask ')); varE =Document.createeventobject (); if(Forget) {//Toggle WordForget.fireevent ("onclick", E); Location.href=Forget.href; Mask.fireevent (' OnClick ', E); //Show Interpretation Area                                if(toggle_description) {Description.style.display= "Block"; Mask.style.display= "None"; if(disable_action) Disable_action.style.display = "None"; Action.style.display= "Block";                        };        }}, Textbox.value); }

The second step opens the Youdao path under: "\dict\6.3.69.8341\resultui\wbreview.html" file

Add buttons and edit boxes

    <!--custom control starts with    <a  style= "font-size:12px;" > Interval settings </a>    <input type= "text"  Style= "width:50px; "  id=" TextBox "value=" "/>    <input type=" button "style="  background-color: #6299c5; border:1px Solder #6229c5; Color: #fff  width:180px; height:25px; "   id=" btn "value=" Start "/>    <!--custom control ends--

Youdao Word Add JS implementation automatically read the word

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.