Greasy Fork

来自缓存

有道单词自动发音

把手松开!安心查你的单词去!

// ==UserScript==
// @name         有道单词自动发音
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  把手松开!安心查你的单词去!
// @author       rainbowpi
// @match        http://dict.youdao.com/w/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let voice = document.getElementsByClassName("dictvoice")[0];
    if (voice == null) {
       alert("该网页的发音图片的class名已经发生了改变,请检查网页元素并且修正!");
    }
    console.log("发音脚本开始工作...");
    voice.click();

    setTimeout(() => { voice.click() }, 3000);

})();