Greasy Fork is available in English.
fanyi
当前为
// ==UserScript==
// @name fanyi自动
// @license MIT
// @version 0.1
// @description fanyi
// @author liuzihaohao
// @match https://fanyi.baidu.com/
// @grant none
// @namespace http://greasyfork.icu/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)})
})();