双语对照网页翻译(英文网页双语对照自动翻译)

本插件开发的初心在于《自动翻译,解放双手》。双语对照网页翻译(国外英文网页,双语对照自动翻译)!English web pages, Chinese English automatic translation by Caiyun smart translation!

< Feedback on 双语对照网页翻译(英文网页双语对照自动翻译)

Review: Good - script works

§
Posted: 29-12-2020

请问一下作者大佬这个脚本的触发条件是什么,我在某些网站无法触发这个脚本的翻译功能,比如:
https://physics.stackexchange.com/questions/603701/what-would-happen-if-a-10-kg-cube-of-iron-at-a-temperature-close-to-0-kelvin-s
或者能不能加一个右键强制翻译?

§
Posted: 29-12-2020

好了,我修改了一下触发逻辑

/*下面是从彩云小译插件copy的js代码 */
$(document).ready(function(){
$("html").show(function(){//<-----------------------改了这里.......
!function (e) {
function t(r) {
if (n[r])
return n[r].exports;
var i = n[r] = {
exports: {},
id: r,
loaded: !1
};
return e[r].call(i.exports, i, i.exports, t),
i.loaded = !0,
i.exports
}
var n = {};
return t.m = e,
t.c = n,
t.p = "",
t(0)
}

jason huangTác giả
§
Posted: 30-12-2020
请问一下作者大佬这个脚本的触发条件是什么,我在某些网站无法触发这个脚本的翻译功能,比如:
https://physics.stackexchange.com/questions/603701/what-would-happen-if-a-10-kg-cube-of-iron-at-a-temperature-close-to-0-kelvin-s
或者能不能加一个右键强制翻译?

本脚本旨在自动翻译英文网页。你发的这个网站没有根据标准的html5去写,所以没法自动翻译,以后有时间再来解决此类问题。暂时的解决办法:在浏览器书签栏新建一个书签,网址填写下面的:

javascript: void((function () { if (!document.body) { return } var popup = document.querySelectorAll('.cyxy-target-popup'); if (popup && popup.length > 0) { return } try { var trs = document.createElement('script'); trs.type = 'text/javascript'; trs.charset = 'UTF-8'; trs.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'caiyunapp.com/dest/trs.js'; document.body.appendChild(trs); } catch (e) { alert(e); } document.addEventListener('securitypolicyviolation', function handler(e) { console.error('securitypolicyviolation', e); alert('%E7%94%B1%E4%BA%8E%E5%BD%93%E5%89%8D%E7%BD%91%E7%AB%99%E7%9A%84%E5%86%85%E5%AE%B9%E5%AE%89%E5%85%A8%E7%AD%96%E7%95%A5(Content Security Policy)%EF%BC%8C%E5%B0%8F%E8%AF%91%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%E7%BF%BB%E8%AF%91%E7%A8%8B%E5%BA%8F%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E5%9C%A8Chrome Web%E5%95%86%E5%BA%97%E6%90%9C%E7%B4%A2%E5%BD%A9%E4%BA%91%E5%B0%8F%E8%AF%91%EF%BC%88LingoCloud%EF%BC%89%E4%B8%8B%E8%BD%BD%E6%8F%92%E4%BB%B6%EF%BC%8C%E6%88%96%E8%80%85%E5%B0%86%E7%BD%91%E9%A1%B5%E4%BF%9D%E5%AD%98%E5%9C%A8%E6%9C%AC%E5%9C%B0%EF%BC%88%E5%8F%B3%E9%94%AE -> %E5%8F%A6%E5%AD%98%E4%B8%BA%EF%BC%89%E8%BF%9B%E8%A1%8C%E7%BF%BB%E8%AF%91%EF%BC%8C%E4%B9%9F%E6%AC%A2%E8%BF%8E%E6%82%A8%E5%9C%A8%E6%89%8B%E6%9C%BA%E5%BA%94%E7%94%A8%E5%95%86%E5%BA%97%E4%B8%8B%E8%BD%BD%E5%BD%A9%E4%BA%91%E5%B0%8F%E8%AF%91App %EF%BC%9A)'); document.removeEventListener('securitypolicyviolation', handler); });})());

,以后遇到不能自动翻译的英文页面,在书签栏点击这个新建的书签就可以。

Post reply

Đăng nhập để bình luận