修改The Little Dict的js文件,自动朗读全部语音

改了下,我测试ok,你试试:
方案1,更改原版的fayin函数如下:

	function fayin(){
		for (var i = 0; i < items.length; i++) {
		  (function (i) {
		    setTimeout(function () {
		    	items.get(i).parentElement.style.backgroundColor="yellow";
				items.eq(i).click();
		    }, 1000 * (i + 1));
		  })(i);
		}
		// for goldendict only
		// for (let i = 0; i < items.length; i++) {
		// 	window.setTimeout(function(){
		// 		items.get(i).parentElement.style.backgroundColor="yellow";
		// 		items.eq(i).click();
		// 		console.log(i);
		// 	}, 1000 * (i + 1));
		// }
	}

方案2:
下载附件文件替换原fy.js文件
fy.zip (31.6 KB)

1 个赞