fanyi自动

fanyi

目前為 2022-07-19 提交的版本,檢視 最新版本

// ==UserScript==
// @name         fanyi自动
// @license      MIT
// @version      0.1
// @description  fanyi
// @author       liuzihaohao
// @match        https://fanyi.baidu.com/
// @grant        none
// @namespace https://gf.qytechs.cn/users/937290
// ==/UserScript==

(function() {
$('document').ready(function(){setTimeout(function () {
    document.getElementsByClassName("op-copy")[0].onclick = function(){
        document.getElementById("transOtherRight").innerHTML+="<text>";
        document.getElementById("transOtherRight").innerHTML+=document.getElementsByClassName("strong")[1].innerText;
        document.getElementById("transOtherRight").innerHTML+="<br/>";
        document.getElementById("transOtherRight").innerHTML+=document.getElementsByClassName("phonetic-transcription")[0].children[1].innerText;
        for(var i=0;i<document.getElementsByClassName("dictionary-comment")[0].childElementCount;i++){
            document.getElementById("transOtherRight").innerHTML+="<br/>";
            document.getElementById("transOtherRight").innerHTML+=document.getElementsByClassName("dictionary-comment")[0].children[i].children[0].innerText;
            document.getElementById("transOtherRight").innerHTML+=" ";
            document.getElementById("transOtherRight").innerHTML+=document.getElementsByClassName("dictionary-comment")[0].children[i].children[1].children[0].innerText;
        }
        document.getElementById("transOtherRight").innerHTML+="</text>";
    }
},2000)})
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址