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