I am more accustomed to using Youdao. After using it for a while, it is very inconvenient to memorize words. Youdao Word Customer Duan does not have the function of automatic reading. This article uses powerful js to implement a simple automatic next word function,
Method:
The first step is to open the "Dict6.3.69.8341resultuijswordBook.js" file under Youdao path
Add the following code
//自动下一个代码 var btnStart = document.getElementById('btn'); var textBox = document.getElementById('textBox'); var record=0; var time = 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'; } } } function timer() { time = setInterval(function() { var mask = document.getElementById('mask'); var e = document.createEventObject(); if(forget) { //切换单词 forget.fireEvent("onclick", e); location.href = forget.href; mask.fireEvent('onclick', e); //显示释义区 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 is to open "Dict6" under Youdao path .3.69.8341resultuiwbreview.html"File
Add buttons and edit boxes
<!--自定义控件开始--> <a style="font-size: 12px;" >间隔设置</a> <input type="text" style="width:50px; " id="textBox" value="1000" /> <input type="button" style=" background-color:#6299c5; border:1px solder #6229c5; color:#fff width:180px; height: 25px; " id="btn" value="Start" /> <!--自定义控件结束-->