diff --git a/README.md b/README.md index 35e2f21..858706d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### translate.js -![translate](translate/translate.png) +![translate.jpg](translate/translate.jpg) 特色: * 划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典”网页翻译 @@ -15,24 +15,22 @@ ### translate-dictionary.js -![translate-dictionary.png](translate/translate-dictionary.png) +![translate-dictionary.jpg](translate/translate-dictionary.jpg) 特色: -* 金山词霸查询 -* 有道词典查询 -* 谷歌翻译查询 +* 划词翻译调用“有道词典(有道翻译)、金山词霸、Bing 词典(必应词典)、沪江小D、谷歌翻译” * 支持发音 * 支持显示当前翻译引擎 * 支持面板拖动 ### translate.js *and* translate-dictionary.js -![translate-bundle.png](translate/translate-bundle.png) +![translate-bundle.jpg](translate/translate-bundle.jpg) 同时安装: -① 划词翻译:有道词典,金山词霸,谷歌翻译 -https://greasyfork.org/zh-CN/scripts/376313-%E5%88%92%E8%AF%8D%E7%BF%BB%E8%AF%91-%E6%9C%89%E9%81%93%E8%AF%8D%E5%85%B8-%E9%87%91%E5%B1%B1%E8%AF%8D%E9%9C%B8-%E8%B0%B7%E6%AD%8C%E7%BF%BB%E8%AF%91 +① 划词翻译:多词典查询 +https://greasyfork.org/zh-CN/scripts/376313-%E5%88%92%E8%AF%8D%E7%BF%BB%E8%AF%91-%E5%A4%9A%E8%AF%8D%E5%85%B8%E6%9F%A5%E8%AF%A2 ② Translate https://greasyfork.org/zh-CN/scripts/34921-translate @@ -54,5 +52,5 @@ Tampermonkey 是一款免费的浏览器扩展和最为流行的用户脚本管 脚本名 | 用途 -|- -translate.js|划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster”网页翻译 -translate-dictionary.js|划词翻译调用“有道词典(有道翻译)、金山词霸、谷歌翻译” +translate.js|划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典”网页翻译 +translate-dictionary.js|划词翻译调用“有道词典(有道翻译)、金山词霸、Bing 词典(必应词典)、沪江小D、谷歌翻译” diff --git a/translate/deprecated-translate-v1.4.js b/translate/deprecated-translate-v1.4.js deleted file mode 100644 index b71656f..0000000 --- a/translate/deprecated-translate-v1.4.js +++ /dev/null @@ -1,297 +0,0 @@ -// ==UserScript== -// @name Translate -// @namespace http://tampermonkey.net/ -// @version 1.4 -// @description 划词翻译调用“必应翻译(必应词典)、谷歌翻译、有道词典(有道翻译)、百度翻译”网页翻译 -// @author barrer -// @match http://*/* -// @include https://*/* -// @include file:///* -// @run-at document-end -// @connect dict.youdao.com -// @connect cn.bing.com -// @connect translate.googleapis.com -// @connect fanyi.baidu.com -// @grant GM_xmlhttpRequest -// ==/UserScript== - -(function () { - 'use strict'; - - // Your code here... - /**日志输出*/ - function log() { - var debug = false; - if (!debug) - return; - if (arguments) { - for (var i = 0; i < arguments.length; i++) { - console.log(arguments[i]); - } - } - } - - log('url:' + window.location.href); - // 翻译图标 - var icon = document.createElement('div'), style = '' + - 'font-family:Arial,sans-serif!important;' + - 'font-weight:normal!important;' + - 'background:#f60!important;' + - 'color:#fff!important;' + - 'border-radius:3px!important;' + - 'font-size:13px!important;' + - 'line-height:100%!important;' + - 'padding:2px 4px!important;' + - 'margin:0 4px!important;' + - 'display:inline-block!important;' + - 'text-decoration:none!important;' + - ''; - icon.innerHTML = '' + - '必应' + - '谷歌' + - '有道' + - '百度' + - ''; - icon.setAttribute('style', '' + - 'display:none!important;' + - 'position:absolute!important;' + - 'font-size:13px!important;' + - 'text-align:left!important;' + - 'z-index:2147483647!important;' + - ''); - // 添加翻译图标到 DOM - document.documentElement.appendChild(icon); - // 鼠标事件:防止选中的文本消失 - document.addEventListener('mousedown', function (e) { - if (e.target == icon || (e.target.parentNode && e.target.parentNode == icon)) {// 点击了翻译图标 - e.preventDefault(); - } - }); - // 选中变化事件:当点击已经选中的文本的时候,隐藏翻译图标和翻译面板(此时浏览器动作是:选中的文本已经取消选中了) - document.addEventListener("selectionchange", function () { - log('selectionchange:' + window.getSelection().toString()); - if (!window.getSelection().toString().trim()) { - icon.style.display = 'none'; - server.containerDestroy(); - } - }); - // 鼠标事件:防止选中的文本消失;显示、隐藏翻译图标 - document.addEventListener('mouseup', function (e) { - if (e.target == icon || (e.target.parentNode && e.target.parentNode == icon)) {// 点击了翻译图标 - e.preventDefault(); - return; - } - for (var i = 0; i < server.rendered.length; i++) {// 点击了翻译内容面板 - if (e.target == server.rendered[i]) - return;// 不再创建翻译图标 - } - var text = window.getSelection().toString().trim(); - log('text:' + text); - if (text && icon.style.display == 'none') { - log('show icon'); - log(text + '|' + e.pageX + '|' + e.pageY); - icon.style.top = e.pageY + 10 + 'px'; - icon.style.left = e.pageX + 10 + 'px'; - icon.style.display = 'block'; - } else if (!text) { - log('hide icon'); - icon.style.display = 'none'; - server.containerDestroy();// 销毁翻译内容面板 - } - }); - // 翻译图标点击事件 - icon.addEventListener('click', function (e) { - var text = window.getSelection().toString().trim(); - if (text) { - log('click:' + text); - server.containerDestroy();// 销毁翻译内容面板 - // 新建翻译内容面板 - var container = server.container(); - container.style.top = e.pageY + 16 + 'px'; - if (e.pageX + 250 + 16 <= document.body.clientWidth)// container 面板css最大宽度为250px - container.style.left = e.pageX + 16 + 'px'; - else - container.style.left = document.body.clientWidth - 250 + 'px'; - document.body.appendChild(container); - server.rendered.push(container); - // 判断用户选择的翻译引擎 - var engine = e.target.hasAttribute('type') ? e.target.getAttribute('type') : ''; - log('engine:' + engine); - switch (engine) { - case 'bing': - server.bing(text, container); - break; - case 'google': - server.google(text, container); - break; - case 'baidu_translator': - server.baidu_translator(text, container); - break; - default: - server.youdao(text, container); - } - } - }); - // 翻译server - var server = { - // 存放已经生成的翻译内容面板(销毁的时候用) - rendered: [], - // 有道翻译 引擎 - youdao: function (text, element) { - this.ajax('http://dict.youdao.com/w/eng/' + encodeURIComponent(text), function (rst, ele) { - var parser = new DOMParser(), doc = parser.parseFromString(rst, 'text/html'), html = ''; - var word = doc.querySelector('#phrsListTab .wordbook-js .keyword'), - pronounce = doc.querySelector('#phrsListTab .wordbook-js .baav'), - trans = doc.querySelector('#phrsListTab .trans-container'), - webTrans = doc.querySelectorAll('#tWebTrans .wt-container .title'); - if (!!!pronounce) // 中文拼音 - pronounce = doc.querySelector('#phrsListTab .wordbook-js .phonetic'); - // 排版 - var pos = trans && trans.querySelectorAll('ul li,ul .wordGroup'); - for (var i = 0; pos && i < pos.length; i++) { - pos[i].innerHTML = pos[i].innerHTML + '▓'; - } - html += word ? word.innerText.trim() : ''; - html += pronounce ? ' ' + pronounce.innerText.replace(/(\s)+/g, ' ').trim() : ''; - html += trans && trans.querySelector('ul') ? '\n' + - trans.querySelector('ul').innerText - .replace(/(\s)+/g, ' ') - .replace(/(▓)+/g, '\n').trim() - : ''; - html += trans && trans.querySelector('.additional') ? - '\n' + trans.querySelector('.additional').innerText.trim().replace(/\n/g, '') : ''; - if (!!webTrans.length) { - html += '\n网络释义:\n'; - for (var j = 0; j < webTrans.length; j++) { - if (j !== 0) - html += ';'; - html += webTrans[j].innerText.replace(/\n/g, '').trim(); - } - } - ele.innerText = html; - ele.style.display = 'block';// 显示结果 - }, function (rst, ele) { - ele.innerText = '有道翻译 无法连接!'; - ele.style.display = 'block';// 显示结果 - }, element); - }, - // Bing词典 引擎 - bing: function (text, element) { - this.ajax('http://cn.bing.com/dict/search?q=' + encodeURIComponent(text), function (rst, ele) { - var parser = new DOMParser(), doc = parser.parseFromString(rst, 'text/html'), html = ''; - var word = doc.querySelector('.hd_area'), - trans = doc.querySelector('.qdef ul'), - forms = doc.querySelector('.qdef .hd_if'); - // 排版 - var headword = doc.querySelector('#headword'); - if (headword) - headword.innerHTML = headword.innerHTML + '
'; - var pos = doc.querySelectorAll('.qdef ul li .pos'); - for (var i = 0; i < pos.length; i++) { - pos[i].innerText = '\n【' + pos[i].innerText + '】'; - } - html += word ? word.innerText.replace(/\n/g, ' ').trim() : ''; - html += trans ? '\n' + trans.innerText.trim() : ''; - html += forms ? '\n' + forms.innerText.trim() : ''; - ele.innerText = html; - ele.style.display = 'block';// 显示结果 - }, function (rst, ele) { - ele.innerText = 'Bing词典 无法连接!'; - ele.style.display = 'block';// 显示结果 - }, element); - }, - // 谷歌翻译 引擎 - google: function (text, element) { - var apiUrl = 'https://translate.googleapis.com/translate_a/single?client=gtx&dt=t&dt=bd&dj=1&source=input&sl=en&tl=zh-CN&hl=en&q='; - this.ajax(apiUrl + encodeURIComponent(text), function (rst, ele) { - var json = JSON.parse(rst), html = ''; - for (var i = 0; i < json.sentences.length; i++) { - html += json.sentences[i].orig + '\n'; - html += json.sentences[i].trans + '\n'; - } - ele.innerText = html; - ele.style.display = 'block';// 显示结果 - }, function (rst, ele) { - ele.innerText = '谷歌翻译 无法连接!'; - ele.style.display = 'block';// 显示结果 - }, element); - }, - // 百度翻译 引擎 - baidu_translator: function (text, element) { - var data = new FormData(); - data.set('from', 'en'); - data.set('to', 'zh'); - data.set('query', text); - this.ajax('http://fanyi.baidu.com/v2transapi', function (rst, ele) { - var json = JSON.parse(rst), html = ''; - for (var i = 0; i < json.trans_result.data.length; i++) { - html += json.trans_result.data[i].src + '\n'; - html += json.trans_result.data[i].dst + '\n'; - } - ele.innerText = html; - ele.style.display = 'block';// 显示结果 - }, function (rst, ele) { - ele.innerText = '百度翻译 无法连接!'; - ele.style.display = 'block';// 显示结果 - }, - element, - 'POST', - data - ); - }, - // ajax 跨域访问公共方法 - ajax: function (url, success, error, element, method, data, headers) { - if (!!!method) - method = 'GET'; - // >>>因为Tampermonkey跨域访问(a.com)时会自动携带对应域名(a.com)的对应cookie - // 不会携带当前域名的cookie - // 所以,GM_xmlhttpRequest【不存在】cookie跨域访问安全性问题 - // 以下设置默认headers不起作用<<< - if (!!!headers) - headers = {'cookie': ''}; - GM_xmlhttpRequest({ - method: method, - url: url, - headers: headers, - data: data, - onload: function (res) { - success(res.responseText, element); - }, - onerror: function (res) { - error(res.responseText, element); - } - }); - }, - // 销毁已经生成的翻译内容面板 - containerDestroy: function () { - for (var i = this.rendered.length - 1; i >= 0; i--) { - if (this.rendered[i] && this.rendered[i].parentNode) { - this.rendered[i].parentNode.removeChild(this.rendered[i]); - } - } - }, - // 生成翻译结果面板 DOM (此时还未添加到页面) - container: function () { - var div = document.createElement('div'); - div.setAttribute('style', '' + - 'display:none!important;' + - 'position:absolute!important;' + - 'font-size:13px!important;' + - 'overflow:auto!important;' + - 'background:#fefee6!important;' + - 'font-family:Arial,sans-serif!important;' + - 'font-weight:normal!important;' + - 'text-align:left!important;' + - 'color:#000!important;' + - 'padding:0.5em 1em!important;' + - 'line-height:1.5em!important;' + - 'border-radius:5px!important;' + - 'border:1px solid #ccc!important;' + - 'max-width:250px!important;' + - 'max-height:150px!important;' + - 'z-index:2147483647!important;' + - ''); - return div; - } - };// 翻译server结束 -})(); \ No newline at end of file diff --git a/translate/icon.psd b/translate/icon.psd deleted file mode 100755 index ee860cf..0000000 Binary files a/translate/icon.psd and /dev/null differ diff --git a/translate/translate-bundle.jpg b/translate/translate-bundle.jpg new file mode 100644 index 0000000..0da6515 Binary files /dev/null and b/translate/translate-bundle.jpg differ diff --git a/translate/translate-bundle.png b/translate/translate-bundle.png deleted file mode 100755 index 8bc4990..0000000 Binary files a/translate/translate-bundle.png and /dev/null differ diff --git a/translate/translate-dictionary.jpg b/translate/translate-dictionary.jpg new file mode 100644 index 0000000..f6e824e Binary files /dev/null and b/translate/translate-dictionary.jpg differ diff --git a/translate/translate-dictionary.js b/translate/translate-dictionary.js index a21228a..95d18a8 100644 --- a/translate/translate-dictionary.js +++ b/translate/translate-dictionary.js @@ -1,8 +1,8 @@ // ==UserScript== -// @name 划词翻译:有道词典,金山词霸,谷歌翻译 +// @name 划词翻译:多词典查询 // @namespace http://tampermonkey.net/ -// @version 1.5 -// @description 划词翻译调用“有道词典(有道翻译)、金山词霸、谷歌翻译” +// @version 1.6 +// @description 划词翻译调用“有道词典(有道翻译)、金山词霸、Bing 词典(必应词典)、沪江小D、谷歌翻译” // @author https://github.com/barrer // @match http://*/* // @include https://*/* @@ -11,6 +11,10 @@ // @connect dict.youdao.com // @connect open.iciba.com // @connect translate.google.cn +// @connect hjenglish.com +// @connect hjapi.com +// @connect hjfile.cn +// @connect cn.bing.com // @grant GM_xmlhttpRequest // ==/UserScript== @@ -25,6 +29,16 @@ word-wrap: break-word !important } + a { + color: #36f; + text-decoration: none; + cursor: pointer; + } + + a:hover { + text-decoration: underline; + } + img { cursor: pointer; display: inline-block; @@ -52,8 +66,8 @@ img[activate] { border: 1px solid transparent; - -webkit-box-shadow: 0px 0px 0px 1px #fc6; - box-shadow: 0px 0px 0px 1px #fc6; + -webkit-box-shadow: 0px 0px 0px 1px #f90; + box-shadow: 0px 0px 0px 1px #f90; } tr-icon { @@ -107,6 +121,34 @@ line-height: 18px; } + a.audio-button{ + color: #36f; + text-decoration: none; + cursor: pointer; + margin-right: 10px; + } + + a.audio-button:last-of-type { + margin-right: auto; + } + + a.audio-button:hover { + text-decoration: underline; + } + + .br { + border-top: 1px dashed #777; + margin: .5em auto .3em auto; + } + + .list-title~.list-title { + margin-top: 1em; + } + + .list-title { + color: #00c; + } + .google .sentences, .google .trans, .google .orig, @@ -192,6 +234,141 @@ .none { display: none; } + + .hjenglish dl, + .hjenglish dt, + .hjenglish dd, + .hjenglish p, + .hjenglish ul, + .hjenglish li, + .hjenglish h3 { + margin: 0; + padding: 0; + margin-block-start: 0px; + margin-block-end: 0px; + margin-inline-start: 0px; + margin-inline-end: 0px; + } + + .hjenglish h3 { + font-size: 1em; + font-weight: normal; + } + + .hjenglish .detail-pron, + .hjenglish .pronounces { + color: #777; + } + + .hjenglish ul { + margin-left: 2em; + } + + /*例句*/ + .hjenglish .def-sentence-from, + .hjenglish .def-sentence-to { + display: none; + } + + .hjenglish .detail-groups dd h3:before { + counter-increment: eq; + content: counter(eq) "."; + display: block; + width: 22px; + float: left; + } + + .hjenglish .detail-groups dl { + counter-reset: eq; + margin-bottom: .5em; + clear: both; + } + + .hjenglish ol, + .hjenglish ul { + list-style: none; + } + + .bing h1, + .bing strong { + font-size: 1em; + font-weight: normal; + margin: 0; + padding: 0; + } + + .bing .concise ul { + list-style: none; + margin: 0; + padding: 0; + } + + .bing .concise .pos { + margin-right: .2em; + } + + .bing .concise .web { + margin-right: auto; + } + + .bing .concise .web:after { + content: ":" + } + + .bing .oald { + margin-top: .4em; + } + + .bing .hd_tf_lh div { + display: inline; + color: #777; + } + + .bing #authid td:first-child { + width: 22px; + margin: 0; + padding: 0; + } + + .bing .def_row { + vertical-align: top; + } + + .bing .bil_dis, + .bing .val_dis { + padding-right: .25em; + } + + /*例句*/ + .bing .li_exs { + display: none; + } + + .bing .li_id { + border: 1px solid #ebebeb; + padding: .2em; + } + + .bing .infor, + .bing .sen_com, + .bing .com_sep, + .bing .bil, + .bing .gra { + padding-right: .25em; + } + + .bing .infor, + .bing .label { + padding-left: .25em; + } + + .bing .each_seg+.each_seg { + margin-top: .5em; + } + + .bing .de_co div { + display: inline; + } `; var link = document.createElement('link'); link.rel = 'stylesheet'; @@ -199,61 +376,122 @@ link.href = URL.createObjectURL(new Blob([style.textContent], { type: 'text/css;charset=UTF-8' })); + // 翻译图标、内容面板、当前选中文本、当前翻译引擎 + var icon = document.createElement('tr-icon'), + content = document.createElement('tr-content'), + selected, + engineId; + // 发音引擎 + var audioEngines = []; // [{name: 'abc', url: 'http://*.mp3', ...}, ...] + // 翻译引擎结果集 + var engineResult = {}; // id: DOM + // ID 类别 + var ids = { + ICIBA: 'iciba', + ICIBA_LOWER_CASE: 'icibaLowerCase', + YOUDAO: 'youdao', + YOUDAO_LOWER_CASE: 'youdaoLowerCase', + BING: 'bing', + BING_LOWER_CASE: 'bingLowerCase', + HJENGLISH: 'hjenglish', + GOOGLE: 'google' + }; + var idsExtension = { + LIST_DICT: [ids.ICIBA, ids.YOUDAO, ids.BING, ids.HJENGLISH], + LIST_DICT_LOWER_CASE: [ids.ICIBA, ids.ICIBA_LOWER_CASE, ids.YOUDAO, ids.YOUDAO_LOWER_CASE, ids.BING, ids.BING_LOWER_CASE, ids.HJENGLISH], + LIST_GOOGLE: [ids.GOOGLE], + lowerCaseMap: (function () { + var obj = {}; + obj[ids.ICIBA_LOWER_CASE] = ids.ICIBA; + obj[ids.YOUDAO_LOWER_CASE] = ids.YOUDAO; + obj[ids.BING_LOWER_CASE] = ids.BING; + return obj; + })(), + names: (function () { + var obj = {}; + obj[ids.ICIBA] = '《金山词霸》'; + obj[ids.ICIBA_LOWER_CASE] = ''; + obj[ids.YOUDAO] = '《有道词典》'; + obj[ids.YOUDAO_LOWER_CASE] = ''; + obj[ids.BING] = '《Bing 词典》'; + obj[ids.BING_LOWER_CASE] = ''; + obj[ids.HJENGLISH] = '《沪江小D》'; + obj[ids.GOOGLE] = ''; + return obj; + })() + } + // 绑定图标拖动事件 + var iconDrag = new Drag(icon); // 图标数组 var iconArray = [{ - name: '金山词霸', - id: 'iciba', - image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX////1AUv2DlT1A0z5ZpP2EVb/+fv2JGT1DFP+7/T//f7+4uv/9vn2HV/+6/H+5u32Gl3//P34ToH1CVH3LGn91eH8q8T4VYb2FVn6hqr/+/z5Y5D8p8H3Pnb4RHr4QXj3MW3+6e/5aZT1B0/3PXX6fqP5c5v7o776g6f4TID7n7v3KWf6iaz7lrX7jK78rMT9ztz2GFv9yNj1BE3+8fX4V4j3NG/4Rnz1BU7/8/f9w9X/+vv5a5b/9/n5Xo3+2+b8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JZpIMjkRRuwBgv3kRMgmDnvYEUNMAIAypt11HKLMZEupjudaQGOwIw6pHLPcXXKIDdIAO0AFjrKUxKOkAHaADdIAO0AE6wB8qcys27PCHyajxujdUyg+7Is1kcMbRhWSYZOxFG6qxPhEkyWTEQcBdH0ly/ADOXZ7xM756YDsg3J1P69mFM4ljFqRTdgMmWMDOU9jXNmWwyDc2A2b6WezdDGxay7LUmK2A1QDLLN7Aht4tlutfsxPQTpP5PlgWjdFs9kfrAR2KPaD0p4dmX96xGnAdpNl3sGOKAu0WA+700Kwr5cLfFietBbykWeAQ9vg7SeFBVAc00czIwa74feFBVAfcBGni2YN9OUN4EFUBP2VpNgITpx+FIVXAMc2ewpkJmnjvKQKmRY8tCocWWSp7rj6ETQGW+f5XOLWaZZHMxDrUAVh/28JixhGc2/axYPS21V2wOhhkgWcX1djLH8STJjvbMOGdzwc8gV2i1/WeRws27wO/X/CzDVQrTXLpHwd3wrVnJN+lYBHr7bEO0AE6QAfoAB2gA/C/oGnaf/DSo5D7etMMAAAAAElFTkSuQmCC', + name: '多词典查询', + id: 'icon-dict', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAwFBMVEX////9+/zc4eSwusOZprF1h5VpfIu5w8rk6Or3+PljeIjy8/X////M09h+kJ2ns7zr7vCMm6dccoNWbX7S2N3GztTAyc/X3OD+9fb95ub6xMX5t7j2qqv0iInydXbxcHH8bW2adH72m5vzfn/xbW7xa2zNcXXibnHxbm/xaGnwZGXwYGHwX2D70dLwXV75vr7z+/7o9/3S7/vL7frc8/yw5fqg3vaL1vRry/HL8f1bxfBVwu9Twu9MwO9Gvu5BvO1OQbHPAAAAAXRSTlMAQObYZgAABjtJREFUeAHsltWChDAMAK9O00DbBPn/Lz0J524bXph1zdBZ4erk5OTk5OTk5DcY63yInxN8Gi41P7sA3yGkfJH5xcM3ib5cYr6L8F1i+v/5OAb4PtP4/wtQ4SfUfxdoHX7C/38K7ARvIb7j3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EPv8NxL8moA2EZ1P/McT7ScxPCHw7Cght8BUBiK/4tPGBB6DvERrErJ8RiBNYf4z8J2kNBhcFtHWSQVA0MSH8/OVsYso9IxDnvgOqLNn4JIDBJQG//hF+ceDSWOecb0YpjXlKoOreKKWkznwW0i3F5wW0dppB/IOwfvtZY6wFBwM8I0BJ0xDaEW+QwFf4vIB1HPI/ydkZ/Y4xTws0EAk3XdlCETJCzwpAAeQBuk/MLoj7tACwpcS3ZFpeELDWJ4BpH39xAUxIFYdXkkAAOtDvOj/6VhHINz/P4/NN6OQAHahmY9YQ6Lap74HmbAmgAgIEmHF6eYGmoV2V/DoOzwsYaIGeW7uwQPfzTkiLBIXHYSigGQiIpQXyLd6WdZElyLfgW3NewGmGFhbYb9AmSdO0bX34OC18AS4IjMsJhKchiLR56dd/QWDxEtAiy/aw/DbdZ3lRvgXxj5sQBBC3i+0C2PtvlOCyLrewCbo/CN4F4H3EgkH47DasvgVpCKG/IKTBeBdStt8G0eznwCSfGkRZUORPdsfgIon4p4D+dRY9N4rbcnc7uIp9BoImGJUz+mGBOL9DoE6j7wL+MPCz0D2egSgpbo5f5vE3AaiBYRt/HlpnHxaI2mp74/rzJAoEjJMjAgOurP2lAB/1nQJRkhd1ia9UH4bzfhMFAlCEWUwIGIVU8AOtlBTC2PsEQCHNqytkbRJ5jq/l3gA4MC4E52xCh+BaviihgM+BHHv0lUHOf6GA7wMtxuHDoR9G6cxfKAC4WUs+HqZpOoyMSy+1nsC5h+ezs0oqO8/wiTFrChykNsdo/XMHHj1DovniAoMwd6DGxQUQ1OBmtByiFVKg/s4EAJO80UArHq3CwJXWV6NrJcdoJfqRC6kuIwUbon8gL168ePHixYs/AQllYQQ4I2UrAAAAAElFTkSuQmCC', trigger: function (text) { - ajax('http://open.iciba.com/huaci_v3/dict.php?word=' + text, function (rst) { - var html = parseIciba(rst); - if (text.toLowerCase() != text) { // 再次翻译一遍小写的 - ajax('http://open.iciba.com/huaci_v3/dict.php?word=' + text.toLowerCase(), function (rst) { - var reHtml = parseIciba(rst); - if (html !== reHtml) { - log(html, reHtml); - html += '
' + reHtml; - } - showContent(html); - }, function (rst) { - showContent(html + '
' + 'error: 无法连接翻译服务'); - }); - } else { - showContent(html); - } + var idsType = idsExtension.LIST_DICT; + if (text != text.toLowerCase()) { + idsType = idsExtension.LIST_DICT_LOWER_CASE; + } + ajax('http://open.iciba.com/huaci_v3/dict.php?word=' + encodeURIComponent(text), function (rst) { + engineResult[ids.ICIBA] = parseIciba(rst); + showContent(idsType); }, function (rst) { - showContent('error: 无法连接翻译服务'); + engineResult[ids.ICIBA] = htmlToDom('error: 无法连接翻译服务'); + showContent(idsType); }); - } - }, { - name: '有道词典', - id: 'youdao', - image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX////99PTpXV3ug4P74uL1uLjfGBjfFhbjMDDuhobpYmLfFRXfFxfiLi785ubiKSniLCzvjIz75OTviYn+9/fjODj86ur1urr86Oj++vroVlbwjo73yMjgGxvkODjqaWn51tbhJCT3wsLwlJTqYGD97+/gHh74ysrxl5fqZmbkOjr51dXyoqL98vLlQUH3xsbzqKj62tr4zs73w8PzpqbsdHTpYGDmSEjlRUX++PjkPT3+9fX74OD63NzwkpLnVFTjMzPiJyfgHBzfGhrteXn1trb//f3//Pz++/v++fn2wMD2urr0r6/zpKTyn5/xm5vvj4/rbGznUlLnTk7mSUnjNTXhJSXnUVHynZ3scnLqZGToWlrkNTXgIiLrbm70srL62Nj63t750tLtfn7xmprhJyffGRnmTEzfFBTfHBz2vLz1tLTtf3/zqqr87Oz/+/vxnJzrcXHgICDtfX375ubugoLpZGT98PDqY2P0rKz4zMz0sLD2vr7hLCzynJzzrKymY9pbAAAAAXRSTlMAQObYZgAACcVJREFUeAHF24dfGlkQB/Cx7YC/Z1BErFjOAxstekQ0oomI2BVbCocaT5Y7W3q/8qdfUS+wb1nYxYR8Pz3Fmd19bz7zilSBmtq6evqeGhS22b9nCo1giCb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AAAElFTkSuQmCC', - trigger: function (text) { - ajax('http://dict.youdao.com/jsonapi?xmlVersion=5.1&jsonversion=2&q=' + text, function (rst) { - var html = parseYoudao(rst); - if (text.toLowerCase() != text) { // 再次翻译一遍小写的 - ajax('http://dict.youdao.com/jsonapi?xmlVersion=5.1&jsonversion=2&q=' + text.toLowerCase(), function (rst) { - var reHtml = parseYoudao(rst); - if (html !== reHtml && reHtml.trim()) { - log(html, reHtml); - html += '
' + reHtml; - } - showContent(html); - }, function (rst) { - showContent(html + '
' + 'error: 无法连接翻译服务'); - }); - } else { - showContent(html); - } + ajax('http://dict.youdao.com/jsonapi?xmlVersion=5.1&jsonversion=2&q=' + encodeURIComponent(text), function (rst) { + engineResult[ids.YOUDAO] = parseYoudao(rst); + showContent(idsType); }, function (rst) { - showContent('error: 无法连接翻译服务'); + engineResult[ids.YOUDAO] = htmlToDom('error: 无法连接翻译服务'); + showContent(idsType); }); + ajax('https://cn.bing.com/dict/search?q=' + encodeURIComponent(text), function (rst) { + engineResult[ids.BING] = parseBing(rst); + showContent(idsType); + }, function (rst) { + engineResult[ids.BING] = htmlToDom('error: 无法连接翻译服务'); + showContent(idsType); + }); + ajax('https://dict.hjenglish.com/w/' + encodeURIComponent(text), function (rst) { + engineResult[ids.HJENGLISH] = parseHjenglish(rst); + showContent(idsType); + }, function (rst) { + engineResult[ids.HJENGLISH] = htmlToDom('error: 无法连接翻译服务'); + showContent(idsType); + }, { + headers: { + 'Cookie': 'HJ_SID=' + uuid() + '; HJ_SSID_3=' + uuid() + '; HJ_CST=1; HJ_CSST_3=1; HJ_UID=' + uuid() + } + }); + if (text != text.toLowerCase()) { // 小写再请求一次 + ajax('http://open.iciba.com/huaci_v3/dict.php?word=' + encodeURIComponent(text.toLowerCase()), function (rst) { + engineResult[ids.ICIBA_LOWER_CASE] = parseIciba(rst); + showContent(idsType); + }, function (rst) { + engineResult[ids.ICIBA_LOWER_CASE] = htmlToDom('error: 无法连接翻译服务'); + showContent(idsType); + }); + ajax('http://dict.youdao.com/jsonapi?xmlVersion=5.1&jsonversion=2&q=' + encodeURIComponent(text.toLowerCase()), function (rst) { + engineResult[ids.YOUDAO_LOWER_CASE] = parseYoudao(rst); + showContent(idsType); + }, function (rst) { + engineResult[ids.YOUDAO_LOWER_CASE] = htmlToDom('error: 无法连接翻译服务'); + showContent(idsType); + }); + ajax('https://cn.bing.com/dict/search?q=' + encodeURIComponent(text.toLowerCase()), function (rst) { + engineResult[ids.BING_LOWER_CASE] = parseBing(rst); + showContent(idsType); + }, function (rst) { + engineResult[ids.BING_LOWER_CASE] = htmlToDom('error: 无法连接翻译服务'); + showContent(idsType); + }); + } } }, { name: '谷歌翻译', - id: 'google', - image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX///9SkPVTkPVTkfVVkfVmnfZsofZroPaox/p0pvfA1/vN3/ximvadwPnQ4fzs8/6JtPi70/v9/v/V5P1fmPZalfV2p/dYlPVonvbY5v38/f/7/P/w9f5Xk/Wtyvr+/v/q8f6RuPn4+//2+f74+v/6/P/a5/3P4PyxzfqBrvigwvny9/7w9v6EsPipyPqGsvhdl/Z+rPenxvq0z/vH2/zC2PtWkvVgmfZhmvajxPqXvPmNtvh8q/dwo/fS4vxblvZ/rfhkm/bf6v3k7v30+P55qfeYvfnm7/7W5f1xpPeUuvluovf5+//o8P73+v9SkfXb6P250vvF2vzi7P240fu91fvu9P7d6f1zpffj7f2+1vvK3fzr8v53qPdel/ZwpPebv/m20Pvl7v3g6/2Mtfhcl/alxvqzzvuIsvhclvWPt/iwzPrE2fzD2fyvzPrn8P51pfdclva91PuxzvpalvXz+P7R4vzc6f1XlPWOtfhRj/V4p/e80/tRkPVvpPdUkvUyb8EpAAAAAXRSTlMAQObYZgAABkNJREFUeF7V24WO7DgaBeDzOylkZoZmZmZmZrqMw7j86qtpqe+oZ+2Uk0pytd8LnPNXyY5dpeD/0tl3L2+2Vrcd8dSTN4tOT+9ReT1Uh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XhOjTLzkKKeAq7AFCOE5faBbOsryrE478BgO5+4uutwyTLt6KTv/bl9BwmuXYRVzse+RTiYpUozPFaEHCNR79NEN/sAUxR6yUutR2P6l0kMNWAGbyLxLX4tM4iCvG5NmCGNYW4hp7mizlIIFBH60ILxNfxZbOvkIAjiNb1KcT1+5frb9atEp8aaKBVoUHiu93Fk3UHCaTn0KKcmxHfFL4ovSeR3nW05jJJfImTKJ5EvYwEWPgMragXU8S3Xcefstsksj+MVoz6SeDZr4BRLwklN2DcSieJ+ErPntj/JqHZGIyquQfEd5JncqMktrkBY+ruAonESngm7yGxZAZGVIsJEknU8Fz2isT2Df15uKORT4Ea/qLcSRo8MejVKH4goXnOgbNtgjTMuss653fPk9jDCv5HdJKRBvY3H3Q4f1sgIfamDRyXi6TJMdmArJPvCyT2w7sqOKKHKmlSKqNRyMhsxUkDS3aDq9FFTdxN+3bQzPHULGliR1nw1SrUTDocvMlCLHQQuFVIW2cDIrEBRk0w52CgvQ08e+exk8ELRk3ct5UgUvtJoaaY4tosno74ns3xqn0kUrlw3jFqagQaqn0kJRV3pCtud1+xo6PjU7HPPZl0Oe5IhvK6Bi31PpKmqmOpVCKVKqiqQpL2Z46hrfGWrORpQzO7s2QF+dNNLugkq7BryGjfJmsoXQ1ICc5ak//QA0kvh8h87CGv5zRHjMw1P5TXd6EYI1NtBvegSzUyQOZRvs8YeMnso2JafucSDOgeMqmB/zAPQ+rnYTMq/MOXg1Eh9/g+tabwz54ojKtmJh2MjEuE53JoTbWta5wMYuG57hJaVt3t+g8ZoPRnzkowxV53IEF69WZqME8jP7k6wEhW4WJrow5z5apzgfAbiQ6scDv1TbUB85WyOd/w63GVNKiOoY7PoVzUwrffz39tLzo/qJzs8fupueCraLQEef8FWy3/BC6ewogAAAAASUVORK5CYII=', + id: 'icon-google', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAwFBMVEX////x+Pu83vl9vvRQq/Q0nvQsm/STyfXY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eEjj7DJzJ5L36DOp/WwZrNh+/A6Nn30FNj4J1MGHv1udn34ILLdgM36vP8ODsm8Dr7TqdYPYWmPgl8q+AEydOnDhx4sR/q8tILrvoB2AAAAAASUVORK5CYII=', trigger: function (text) { var url = 'https://translate.google.cn/translate_a/single?client=gtx&dt=t&dt=bd&dj=1&source=input&hl=zh-CN&sl=auto'; url += '&tk=' + token(text); @@ -262,20 +500,14 @@ else url += '&tl=zh-CN&q=' + text; ajax(url, function (rst) { - var html = parseGoogle(rst); - showContent(html); + engineResult[ids.GOOGLE] = parseGoogle(rst); + showContent(idsExtension.LIST_GOOGLE); }, function (rst) { - showContent('error: 无法连接翻译服务'); + engineResult[ids.GOOGLE] = htmlToDom('error: 无法连接翻译服务'); + showContent(idsExtension.LIST_GOOGLE); }); } }]; - // 翻译图标、内容面板、当前选中文本、当前翻译引擎 - var icon = document.createElement('tr-icon'), - content = document.createElement('tr-content'), - selected, - engineId; - // 绑定图标拖动事件 - var iconDrag = new Drag(icon); // 添加翻译引擎图标 iconArray.forEach(function (obj) { var img = document.createElement('img'); @@ -285,8 +517,12 @@ img.setAttribute('icon-id', obj.id); img.addEventListener('mouseup', function () { if (!isDrag()) { // 没有拖动鼠标抬起的时候触发点击事件 + if (engineId == obj.id) + return; // 已经是当前翻译引擎 engineId = obj.id; // 翻译引擎 ID engineActivateShow(); // 显示翻译引擎指示器 + audioEngines = []; // 清空发音引擎 + engineResult = {}; // 清空翻译引擎结果集 obj.trigger(selected); // 启动翻译引擎 } }); @@ -332,27 +568,34 @@ icon.style.position = 'absolute'; icon.style.zIndex = '2147483647'; } else if (!selected) { // 隐藏翻译图标 - log('hide icon'); - icon.style.display = 'none'; - content.style.display = 'none'; - engineActivateHide(); - forceStopDrag(); + log('hide icon:mouseup'); + hideIcon(); } }); // 选中变化事件:当点击已经选中的文本的时候,隐藏翻译图标(此时浏览器动作是:选中的文本已经取消选中了) - document.addEventListener("selectionchange", function (e) { + document.addEventListener('selectionchange', function (e) { log('selectionchange event:', e); log('selectionchange:' + window.getSelection().toString()); if (!window.getSelection().toString().trim()) { - icon.style.display = 'none'; - content.style.display = 'none'; - engineActivateHide(); - forceStopDrag(); + log('hide icon:selectionchange'); + hideIcon(); + } + }); + // 内容面板滚动事件 + content.addEventListener('scroll', function (e) { + if (content.scrollHeight - content.scrollTop === content.clientHeight) { + log('scroll bottom', e); + e.preventDefault(); + e.stopPropagation(); + } else if (content.scrollTop === 0) { + log('scroll top', e); + e.preventDefault(); + e.stopPropagation(); } }); /**日志输出*/ function log() { - var debug = false; + var debug = true; if (!debug) return; if (arguments) { @@ -429,6 +672,14 @@ } return false; } + /**uuid*/ + function uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } /**对象转 xml*/ function objToXml(obj) { var xml = ''; @@ -461,6 +712,20 @@ return xml.replace(/<([^/]+?)>/g, '<' + tag + ' class="$1">') .replace(/<\/(.+?)>/g, ''); } + // html 字符串转 DOM + function htmlToDom(htmlStr) { + var div = document.createElement('div'); + div.innerHTML = htmlStr; + return div; + } + /**清理 html*/ + function cleanHtml(htmlStr) { + return htmlStr.replace(//ig, '') + .replace(//ig, '') + .replace(//ig, '') + .replace(//ig, '') + .replace(/on[a-z]*=".*?"/ig, ''); + } /**ajax 跨域访问公共方法*/ function ajax(url, success, error, obj) { if (!!!obj) @@ -470,7 +735,7 @@ // >>>因为Tampermonkey跨域访问(a.com)时会自动携带对应域名(a.com)的对应cookie // 不会携带当前域名的cookie // 所以,GM_xmlhttpRequest【不存在】cookie跨域访问安全性问题 - // 以下设置默认headers不起作用<<< + // 以下设置的cookie会添加到已有cookie的后面<<< if (!!!obj.headers) obj.headers = { 'cookie': '' @@ -486,32 +751,81 @@ }, onerror: function (res) { error(res.responseText, res, obj); + }, + onabort: function (res) { + error('the request was aborted', res, obj); + }, + ontimeout: function (res) { + error('the request failed due to a timeout', res, obj); + }, + onreadystatechange: function () { + log('ajax:', arguments); } }); } + /**翻译引擎结果集状态判断*/ + function isAllDone(idsType) { + var rst = false; + idsType.forEach(function (id, i) { + if (i == 0) + rst = true; + if (!(id in engineResult)) { + log('isAllDone(not found):' + id); + rst = false; + return rst; + } + }); + return rst; + } /**显示内容面板*/ - function showContent(html) { + function showContent(idsType) { + log('showContent:', idsType, engineResult); + if (!isAllDone(idsType)) { + log('showContent return'); + return; + } + log('showContent rendering'); // 发音 - var audio = document.createElement('tr-audio'), - us = document.createElement('a'), - uk = document.createElement('a'); - - us.innerHTML = '♪US'; - us.setAttribute('href', 'javascript:void(0)'); - us.addEventListener('mouseup', playUS); - // us.addEventListener('mouseover', playUS); - uk.innerHTML = '♪UK'; - uk.setAttribute('href', 'javascript:void(0)'); - uk.addEventListener('mouseup', playUK); - // uk.addEventListener('mouseover', playUK); - audio.appendChild(us); - audio.appendChild(uk); + audioEngines.push({ + name: '♪US', + url: 'http://dict.youdao.com/dictvoice?audio=' + selected + '&type=2' + }); + audioEngines.push({ + name: '♪UK', + url: 'http://dict.youdao.com/dictvoice?audio=' + selected + '&type=1' + }); + var audio = document.createElement('tr-audio'); + audioEngines.forEach(function (obj) { + audio.appendChild(getPlayButton(obj)); + }); // 翻译内容 - content.innerHTML = '
' + html + '
'; - if (engineId != 'google') { // 谷歌翻译不显示发音图标 + content.innerHTML = ''; + // 比较大小写内容 + var needDel = {}; + for (var key in idsExtension.lowerCaseMap) { + if (engineResult[key] && + engineResult[idsExtension.lowerCaseMap[key]] && + engineResult[key].innerHTML == engineResult[idsExtension.lowerCaseMap[key]].innerHTML) { + needDel[key] = key; + } + } + idsType.forEach(function (id) { + if (!(id in needDel)) { + if (idsExtension.names[id]) { + var title = document.createElement('div'); + title.innerHTML = idsExtension.names[id]; + title.setAttribute('class', 'list-title'); + content.appendChild(title); + } + content.appendChild(engineResult[id]); + } + }); + if (engineId != 'icon-google') { // 谷歌翻译不显示发音图标 content.insertBefore(audio, content.childNodes[0]); } content.style.display = 'block'; + content.scrollTop = 0; + content.scrollLeft = 0; } /**隐藏翻译引擎指示器*/ function engineActivateHide() { @@ -524,14 +838,23 @@ engineActivateHide(); icon.querySelector('img[icon-id="' + engineId + '"').setAttribute('activate', 'activate'); } - /**美式发音*/ - function playUS() { + /**隐藏 icon*/ + function hideIcon() { + icon.style.display = 'none'; + content.style.display = 'none'; + engineId = ''; + audioEngines = []; + engineResult = {}; + engineActivateHide(); + forceStopDrag(); + } + /**发音*/ + function play(obj) { if (isDrag()) { // 拖动时候不触发发音 return; } - var url = 'http://dict.youdao.com/dictvoice?audio=' + selected + '&type=2'; var audio = new Audio(); - ajax(url, function (rst, res) { + ajax(obj.url, function (rst, res) { audio.src = URL.createObjectURL(res.response); audio.play(); }, function (rst) { @@ -540,28 +863,22 @@ responseType: 'blob' }); } - /**英式发音*/ - function playUK() { - if (isDrag()) { // 拖动时候不触发发音 - return; - } - var url = 'http://dict.youdao.com/dictvoice?audio=' + selected + '&type=1'; - var audio = new Audio(); - ajax(url, function (rst, res) { - audio.src = URL.createObjectURL(res.response); - audio.play(); - }, function (rst) { - log(rst); - }, { - responseType: 'blob' + /**得到发音按钮*/ + function getPlayButton(obj) { + var type = document.createElement('a'); + type.innerHTML = obj.name; + type.setAttribute('href', 'javascript:void(0)'); + type.setAttribute('class', 'audio-button'); + type.addEventListener('mouseup', function () { + play(obj); }); + return type; } /**有道词典排版*/ function parseYoudao(rst) { + var html = ''; try { - // if (true) return xmlToHtml(objToXml(JSON.parse(rst)), 'span'); var rstJson = JSON.parse(rst), - html = '', phoneStyle = 'color:#777;'; if (rstJson.ec) { var word = rstJson.ec.word[0], @@ -606,14 +923,18 @@ if (rstJson.fanyi && rstJson.fanyi.tran) { html += rstJson.fanyi.tran; } - return html; } catch (error) { log(error); - return error; + html += error; } + var dom = document.createElement('div'); + dom.setAttribute('class', ids.YOUDAO); + dom.innerHTML = html; + return dom; } /**金山词霸排版*/ function parseIciba(rst) { + var html = ''; try { rst = rst.replace(/class=\\"icIBahyI-prons\\"/g, '__mystyle__') // 音标 .replace(/\\"/g, '"') // 引号 @@ -630,20 +951,105 @@ // 音标 .replace(/__mystyle__/g, ' style="color:#777;"'); var match = /dict.innerHTML='(.*)?';/g.exec(rst); - return match[1]; + html += match[1]; + if (html.indexOf('去爱词霸官网翻译') != -1) + html = ''; } catch (error) { log(error); - return error; + html += error; } + var dom = document.createElement('div'); + dom.setAttribute('class', ids.ICIBA); + dom.innerHTML = html; + return dom; + } + /**沪江小D排版*/ + function parseHjenglish(rst) { + var dom = document.createElement('div'); + dom.setAttribute('class', ids.HJENGLISH); + try { + var doc = htmlToDom(cleanHtml(rst)); + var entry = doc.querySelector('.word-text h2'); + var pronounces = doc.querySelector('.pronounces'); + var collins = doc.querySelector('div[data-id="detail"] .word-details-item-content .detail-groups'); + if (entry) { + var entryDom = document.createElement('div'); + entryDom.setAttribute('class', 'entry'); + entryDom.innerHTML = entry.innerHTML; + dom.appendChild(entryDom); + if (pronounces) { + var pronounceDom = document.createElement('div'); + pronounces.querySelectorAll('.pronounces [class="word-audio"]').forEach(function (ele) { + pronounceDom.appendChild(getPlayButton({ + name: '♪US', + url: ele.getAttribute('data-src') + })); + }); + pronounces.querySelectorAll('.pronounces [class="word-audio word-audio-en"]').forEach(function (ele) { + pronounceDom.appendChild(getPlayButton({ + name: '♪UK', + url: ele.getAttribute('data-src') + })); + }); + dom.appendChild(pronounceDom); + dom.appendChild(pronounces); + } + if (collins) { + dom.appendChild(htmlToDom('
《权威词典》
')); + dom.appendChild(collins); + } + } + } catch (error) { + log(error); + dom.appendChild(htmlToDom(error)); + } + return dom; + } + /**必应词典排版*/ + function parseBing(rst) { + var html = ''; + try { + rst = cleanHtml(rst).replace(/(?:a>)/ig, 'span>') + .replace(/(?:'; + if (concise) + html += '
' + concise.outerHTML + '
'; + if (tense) + html += '
' + tense.outerHTML + '
'; + if (oald) + html += '
《牛津高阶英汉双解词典第八版》
' + oald.outerHTML + '
'; + } + } catch (error) { + log(error); + html += error; + } + var dom = document.createElement('div'); + dom.setAttribute('class', ids.BING); + dom.innerHTML = html; + return dom; } /**谷歌翻译排版*/ function parseGoogle(rst) { + var dom = document.createElement('div'); + dom.setAttribute('class', ids.GOOGLE); try { - return xmlToHtml(objToXml(JSON.parse(rst)), 'span'); + // 发音 + // 内容 + dom.appendChild(htmlToDom(xmlToHtml(objToXml(JSON.parse(rst)), 'span'))); } catch (error) { log(error); - return error; + dom.appendChild(htmlToDom(error)); } + return dom; } /** * 谷歌翻译 token 计算 diff --git a/translate/translate-dictionary.png b/translate/translate-dictionary.png deleted file mode 100755 index 042f9c2..0000000 Binary files a/translate/translate-dictionary.png and /dev/null differ diff --git a/translate/translate.jpg b/translate/translate.jpg new file mode 100644 index 0000000..716fcf6 Binary files /dev/null and b/translate/translate.jpg differ diff --git a/translate/translate.js b/translate/translate.js index efcf7c0..9346f72 100644 --- a/translate/translate.js +++ b/translate/translate.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Translate // @namespace http://tampermonkey.net/ -// @version 3.6 +// @version 3.7 // @description 划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典”网页翻译 // @author https://github.com/barrer // @match http://*/* @@ -97,11 +97,13 @@ })); var gm = { TEXT: 'barrer.translate.data.transfer.text', + REDIRECT_URL: 'barrer.translate.data.transfer.redirect_url', MORE: 'barrer.translate.data.config.more', HIDE: 'barrer.translate.data.config.hide', SORT: 'barrer.translate.data.config.sort', reset: function () { GM_deleteValue(this.TEXT); + GM_deleteValue(this.REDIRECT_URL); GM_deleteValue(this.MORE); GM_deleteValue(this.HIDE); GM_deleteValue(this.SORT); @@ -143,12 +145,12 @@ } }; var iconArray = [{ - name: '金山词霸', - id: 'iciba', - image: 'data:image/png;base64,iVB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tWEpuDyvYrVra80+Z0PJfjUIv2USE5+BAi54rxnpEwLJn2UaXzxQOUed+t6r6EVZFOKmWap6Mo8A/3UGE0DuvCUxmqnaXyK7c1SYX+J7Ant0Sl6Xxulg2RRt57NkLwLgq22ABTKMBhC+uupw1FOlgzBoU8+yiRptjWBqvU2zdPgecoFRGGBr7Aa1YJyI3SJLlg4d3vyrdXqD5AvOAPYDLAMp05wKUAYK90Ry7DLLfCYrPDgIsBCHecsSBzDYHiy8z8yxBcCzAn/AKRq0/M6z4CXA8AwtM9JMnAJoR287feJsC9AMHS/wiJZpIMjkRRuwBgv3kRMgmDnvYEUNMAIAypt11HKLMZEupjudaQGOwIw6pHLPcXXKIDdIAO0AFjrKUxKOkAHaADdIAO0AE6wB8qcys27PCHyajxujdUyg+7Is1kcMbRhWSYZOxFG6qxPhEkyWTEQcBdH0ly/ADOXZ7xM756YDsg3J1P69mFM4ljFqRTdgMmWMDOU9jXNmWwyDc2A2b6WezdDGxay7LUmK2A1QDLLN7Aht4tlutfsxPQTpP5PlgWjdFs9kfrAR2KPaD0p4dmX96xGnAdpNl3sGOKAu0WA+700Kwr5cLfFietBbykWeAQ9vg7SeFBVAc00czIwa74feFBVAfcBGni2YN9OUN4EFUBP2VpNgITpx+FIVXAMc2ewpkJmnjvKQKmRY8tCocWWSp7rj6ETQGW+f5XOLWaZZHMxDrUAVh/28JixhGc2/axYPS21V2wOhhkgWcX1djLH8STJjvbMOGdzwc8gV2i1/WeRws27wO/X/CzDVQrTXLpHwd3wrVnJN+lYBHr7bEO0AE6QAfoAB2gA/C/oGnaf/DSo5D7etMMAAAAAElFTkSuQmCC', - host: ['www.iciba.com'], + name: 'Bing 词典', + id: 'bingDict', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX///8NhIQNgoIWiYn8/v4RhYUcjIwUh4cOhIQhjo4pkpLt9vb7/f3z+fkwlpZYqqrV6urq9fWr1dUlkJCYy8uEwcH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GmoR/zALAoiJTADgfJWAB9GmzVIDPlIAO+2xApAEMmweo3icUgKx5AChxG/0DRikBJx0Au78+ZwuAP54yBkArFiWkP8CYUYCeECxKTAEAkaVZZbV3wCklYBO+nLb4Mt8zgHIpVjahW3w2lyHEyhlQRuCGWrEah4QhAGC3VHxoHWAIeqhcSKsyNeCJcQCAtj/PElDNTolWzUALbsz78fEG9UJkHKC16vdktA4wB13b2cxJhFBuRsYBzpNYEy9iA2gcBEVEqwED8IWSkdJDJMwA8cmAiqSvQykloOMm5vAWXKjLKsBph+Gdr54SZAbg48M1pDgVr9HdGypj+vHHikgI7auZccDcCwmp4kbNAIy4ORmpkjNOSsB/4J6X758hXfJ+CigB2SvAQW5LQMoya0kwCAhVFAkpE0uaA4wBqjE/9fBnU54kgCGAtpznkC6CiewOgAHAu2O+5GoibUrA6wBDAKmWeI8EqSLPcrrZpwDgPNL2/Pdjjfp3PuOR8/EJAHYAKeaJAzuA7B4r0//UarxwIQTADEC2pk94uIjNIyArlxcEbGZgmyQWJwFYAQj5KbgJwApAUKofx4EdYHvwlQbADCC7ZhYA2AHE3AAAOwCZ9TWAvkEBjRVdSoGRghtoIKLmhsBYIfc9pI57tAaG8wbzlAsPSSx5wYyG91YJxfjnlRMwqVDsQ7/Do/joBzCxv4rYV+u1bxpgapG60s+JrxIB0ytEsbdWFfddsCJPWsSbI1xi3AHWxC+5br7/OKxMgHW19prYNcU9B5aWXPZ3AXAPCmB5owkOOyeoMQ1sSMsp2ClxfwRsyhcWCOriMj6wr1C62S4QlOkG2Jlj/E/hGjDfTHvA7k7uS9dfKYaBQc7g5VdJwV9KAptOM4Isc1O7wCxvRR20Ytv5F1aNwb4yuFDOAAAAAElFTkSuQmCC', + host: ['cn.bing.com'], popup: function (text) { - popupCenter('http://www.iciba.com/' + encodeURIComponent(text), null, 800, screen.height); + popupCenter('https://cn.bing.com/dict/search?q=' + encodeURIComponent(text), null, 800, screen.height); }, custom: function (text) {} }, @@ -162,28 +164,13 @@ }, custom: function (text) {} }, - { - name: '谷歌翻译', - id: 'googleCn', - image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX///9SkPVTkPVTkfVVkfVmnfZsofZroPaox/p0pvfA1/vN3/ximvadwPnQ4fzs8/6JtPi70/v9/v/V5P1fmPZalfV2p/dYlPVonvbY5v38/f/7/P/w9f5Xk/Wtyvr+/v/q8f6RuPn4+//2+f74+v/6/P/a5/3P4PyxzfqBrvigwvny9/7w9v6EsPipyPqGsvhdl/Z+rPenxvq0z/vH2/zC2PtWkvVgmfZhmvajxPqXvPmNtvh8q/dwo/fS4vxblvZ/rfhkm/bf6v3k7v30+P55qfeYvfnm7/7W5f1xpPeUuvluovf5+//o8P73+v9SkfXb6P250vvF2vzi7P240fu91fvu9P7d6f1zpffj7f2+1vvK3fzr8v53qPdel/ZwpPebv/m20Pvl7v3g6/2Mtfhcl/alxvqzzvuIsvhclvWPt/iwzPrE2fzD2fyvzPrn8P51pfdclva91PuxzvpalvXz+P7R4vzc6f1XlPWOtfhRj/V4p/e80/tRkPVvpPdUkvUyb8EpAAAAAXRSTlMAQObYZgAABkNJREFUeF7V24WO7DgaBeDzOylkZoZmZmZmZrqMw7j86qtpqe+oZ+2Uk0pytd8LnPNXyY5dpeD/0tl3L2+2Vrcd8dSTN4tOT+9ReT1Uh7VK0ZWY72hTJT7Vv/Zr+2W0BGtEs0uRd+EEaVOcxcP1XBSmy/YcrrkUksEutiLVBkzVqLldKslLbVZiVZhmZ8UdJ936M3smTV8u3pERyvRv3SbEn3/rYmSQ8jHTQEtyl8O8eHmJn3qyMK4WcTJqCSskjxowKHsTUKlljF6cRWFE3esgc1wEG9Cvp1ggk7D0uxB0Kh1MK2Si8CV0yfrSZK6FA135n+NkMsUTy0FW4ypF5hu8gaRcJEHmm/h2BXKikXky32IEkqKnP1uRfwVJJW+KzJcelZ7/87wV+UeQlL2eIElKamDCkXY5XWmHP54YIzG1sx2yDpz7JKGw6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2isT2Df15uKORT4Ea/qLcSRo8MejVKH4goXnOgbNtgjTMuss653fPk9jDCv5HdJKRBvY3H3Q4f1sgIfamDRyXi6TJMdmArJPvCyT2w7sqOKKHKmlSKqNRyMhsxUkDS3aDq9FFTdxN+3bQzPHULGliR1nw1SrUTDocvMlCLHQQuFVIW2cDIrEBRk0w52CgvQ08e+exk8ELRk3ct5UgUvtJoaaY4tosno74ns3xqn0kUrlw3jFqagQaqn0kJRV3pCtud1+xo6PjU7HPPZl0Oe5IhvK6Bi31PpKmqmOpVCKVKqiqQpL2Z46hrfGWrORpQzO7s2QF+dNNLugkq7BryGjfJmsoXQ1ICc5ak//QA0kvh8h87CGv5zRHjMw1P5TXd6EYI1NtBvegSzUyQOZRvs8YeMnso2JafucSDOgeMqmB/zAPQ+rnYTMq/MOXg1Eh9/g+tabwz54ojKtmJh2MjEuE53JoTbWta5wMYuG57hJaVt3t+g8ZoPRnzkowxV53IEF69WZqME8jP7k6wEhW4WJrow5z5apzgfAbiQ6scDv1TbUB85WyOd/w63GVNKiOoY7PoVzUwrffz39tLzo/qJzs8fupueCraLQEef8FWy3/BC6ewogAAAAASUVORK5CYII=', - host: ['translate.google.cn'], - popup: function (text) { - popupCenter('https://translate.google.cn', null, 800, screen.height); - }, - custom: function (text) { - var source = document.querySelector('#source'); - source.value = text; - tiggerEvent(source, 'input'); - tiggerEvent(source, 'keyup'); - } - }, { name: '沪江小D', id: 'hjenglish', image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAwFBMVEUzqfEhqvUTpvQRpfMSo/ITovEVofEToPAUnvAQnvUVoOwOnO8NoOwHm/EWnOoMoPIKlew9sfEkoO0bo+/g8vrv9/vz/Pz5/f3J5/d0wfFPrOwUnO6g1PP6/vn+/vn+/v3///8QmOkbmuz9/vP5+vz9+/0Vmu0Tme/0/Pb++fn6+vk+pOsmlOcamOQWkugJj+wVmOsVl+sVluoXleoXlOkXjeUXkecMieYah+QXjugW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N4CfLAUIMycvUWgXcRWTShvgTGAj/i1bqi9mjWBtvaCG4cfwsjVVdXeIlAt47IEt6dOCoESexKfN677XVldz7oAF+yKyQNAZJhAyHOnqhEPCiBup0eGEiGIo9Ypqj5VQIV4xZov4d2Pef6fqpumaT9RoPy/8WHNANkh8MMw5lnuXN2WdWmpvl2gXKKumiyLvrRDB5oTwzAcx/8PNP4gtvzatO//VpcUvZtYx53qkM+YtFP92uBR25Z2xZm+NQjIGbLf+QdKITUhgMFUccLqvbC7UyJwBmYEUCoVNMKc7cW//YF6CQyiNqjqwDDbQAT/6bS6ugLDAFVvAvowLSACRPXB39J2+2Bs8AHijotqAWWtBwREgKwVAREQAX/b8UHM4Xb64Le98XHnYQELREAErA9Ix1ovunSItirNRyIAAAAASUVORK5CYII=', host: ['dict.hjenglish.com'], popup: function (text) { - popupCenter('https://dict.hjenglish.com/notfound/w/' + encodeURIComponent(text), null, 1024, screen.height); + popupCenter('https://dict.hjenglish.com/w/' + encodeURIComponent(text), null, 1024, screen.height); }, custom: function (text) { document.querySelectorAll('.word-details-button-expand').forEach(function (ele) { @@ -234,16 +221,6 @@ tiggerEvent(source, 'keyup'); } }, - { - name: 'Bing 词典', - id: 'bingDict', - image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX///8NhIQNgoIWiYn8/v4RhYUcjIwUh4cOhIQhjo4pkpLt9vb7/f3z+fkwlpZYqqrV6urq9fWr1dUlkJCYy8uEwcHi8PA1mJjd7u49nJx7vLz5/PxAnp72+/vg7+9dra05mpq329twtrYtlJSgz89IoqKNxMTw9/d1urrn8/NBoaFps7P0+voZiorI4+PC4OBOpKTJ5OS12dnN5eW63Ny83d2a09Pl9fXl8vJksLCBv7+Lzc1UqKjF4uIPhYXZ6+uk0dGRx8eFyclfsbENgYGx19cRg4MOgoLQ5+cei4sOgIDy+Pjd8fFSp6dcq6vZ7Owtk5Nwvb294uLS6Oi+3t4MhIQumJjL6em8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dJDJMwA8cmAiqSvQykloOMm5vAWXKjLKsBph+Gdr54SZAbg48M1pDgVr9HdGypj+vHHikgI7auZccDcCwmp4kbNAIy4ORmpkjNOSsB/4J6X758hXfJ+CigB2SvAQW5LQMoya0kwCAhVFAkpE0uaA4wBqjE/9fBnU54kgCGAtpznkC6CiewOgAHAu2O+5GoibUrA6wBDAKmWeI8EqSLPcrrZpwDgPNL2/Pdjjfp3PuOR8/EJAHYAKeaJAzuA7B4r0//UarxwIQTADEC2pk94uIjNIyArlxcEbGZgmyQWJwFYAQj5KbgJwApAUKofx4EdYHvwlQbADCC7ZhYA2AHE3AAAOwCZ9TWAvkEBjRVdSoGRghtoIKLmhsBYIfc9pI57tAaG8wbzlAsPSSx5wYyG91YJxfjnlRMwqVDsQ7/Do/joBzCxv4rYV+u1bxpgapG60s+JrxIB0ytEsbdWFfddsCJPWsSbI1xi3AHWxC+5br7/OKxMgHW19prYNcU9B5aWXPZ3AXAPCmB5owkOOyeoMQ1sSMsp2ClxfwRsyhcWCOriMj6wr1C62S4QlOkG2Jlj/E/hGjDfTHvA7k7uS9dfKYaBQc7g5VdJwV9KAptOM4Isc1O7wCxvRR20Ytv5F1aNwb4yuFDOAAAAAElFTkSuQmCC', - host: ['cn.bing.com'], - popup: function (text) { - popupCenter('https://cn.bing.com/dict/search?q=' + encodeURIComponent(text), null, 800, screen.height); - }, - custom: function (text) {} - }, { name: 'Microsoft Translator', id: 'bingTrans', @@ -261,6 +238,31 @@ } } }, + { + name: '谷歌翻译', + id: 'googleCn', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX///9SkPVTkPVTkfVVkfVmnfZsofZroPaox/p0pvfA1/vN3/ximvadwPnQ4fzs8/6JtPi70/v9/v/V5P1fmPZalfV2p/dYlPVonvbY5v38/f/7/P/w9f5Xk/Wtyvr+/v/q8f6RuPn4+//2+f74+v/6/P/a5/3P4PyxzfqBrvigwvny9/7w9v6EsPipyP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mqmOpVCKVKqiqQpL2Z46hrfGWrORpQzO7s2QF+dNNLugkq7BryGjfJmsoXQ1ICc5ak//QA0kvh8h87CGv5zRHjMw1P5TXd6EYI1NtBvegSzUyQOZRvs8YeMnso2JafucSDOgeMqmB/zAPQ+rnYTMq/MOXg1Eh9/g+tabwz54ojKtmJh2MjEuE53JoTbWta5wMYuG57hJaVt3t+g8ZoPRnzkowxV53IEF69WZqME8jP7k6wEhW4WJrow5z5apzgfAbiQ6scDv1TbUB85WyOd/w63GVNKiOoY7PoVzUwrffz39tLzo/qJzs8fupueCraLQEef8FWy3/BC6ewogAAAAASUVORK5CYII=', + host: ['translate.google.cn'], + popup: function (text) { + popupCenter('https://translate.google.cn', null, 800, screen.height); + }, + custom: function (text) { + var source = document.querySelector('#source'); + source.value = text; + tiggerEvent(source, 'input'); + tiggerEvent(source, 'keyup'); + } + }, + { + name: '金山词霸', + id: 'iciba', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX////1AUv2DlT1A0z5ZpP2EVb/+fv2JGT1DFP+7/T//f7+4uv/9vn2HV/+6/H+5u32Gl3//P34ToH1CVH3LGn91eH8q8T4VYb2FVn6hqr/+/z5Y5D8p8H3Pnb4RHr4QXj3MW3+6e/5aZT1B0/3PXX6fqP5c5v7o776g6f4TID7n7v3KWf6iaz7lrX7jK78rMT9ztz2GFv9yNj1BE3+8fX4V4j3NG/4Rnz1BU7/8/f9w9X/+vv5a5b/9/n5Xo3+2+b8rsb8tsv8ssn9ytr8qcL+7fL90t/5W4v2HF79wtT3Kmj9xtf4UIP8vdD/9fj+2uX92OP8qsP+3+j/+Pr+4er+7vP2IWL+8vb+3ef5cJn8v9L7krL4WIj3OXL5bpj7nbr5bJf3L2v6gKX7mLb7k7P4SX78uM34U4X8t8z2ImL8u8/3N3H2IGH9wNP6dp76eJ/5cZr2H2D6iKv+5Oz/9Pf5apX6f6T+5+790+D91+P6eqD8tMr7j7D7m7j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dFs9kfrAR2KPaD0p4dmX96xGnAdpNl3sGOKAu0WA+700Kwr5cLfFietBbykWeAQ9vg7SeFBVAc00czIwa74feFBVAfcBGni2YN9OUN4EFUBP2VpNgITpx+FIVXAMc2ewpkJmnjvKQKmRY8tCocWWSp7rj6ETQGW+f5XOLWaZZHMxDrUAVh/28JixhGc2/axYPS21V2wOhhkgWcX1djLH8STJjvbMOGdzwc8gV2i1/WeRws27wO/X/CzDVQrTXLpHwd3wrVnJN+lYBHr7bEO0AE6QAfoAB2gA/C/oGnaf/DSo5D7etMMAAAAAElFTkSuQmCC', + host: ['www.iciba.com'], + popup: function (text) { + popupCenter('http://www.iciba.com/' + encodeURIComponent(text), null, 800, screen.height); + }, + custom: function (text) {} + }, { name: '海词词典', id: 'haici', @@ -333,10 +335,10 @@ { name: 'Settings', id: 'settings', - image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAQ3UlEQVR42uydCXQURRrHF8UDcEFR1IX1QJD1eQHiuRh3kmh8LvpUNB5gJpMQIrJmZoLI6qowCYewaCaTAAoioBwq6sqKIF7ghSCwighZFLkFFgWBIIQr6f1/703vjjHdXdVV3V28tO/9XsZMH8X3/bv6q6++qvxG0zSfRkyjN0Bjp9EboLHT6A3gJrFYrKkvgEZEn1j8tj6x8tfAYrAF1BbEKq72BdBIgMOnAi2Vglj5RKvz8mPxAXmlFX/yBXB0A0eWL6wvALC3f2zsSYaiKSm/P+XYKggmXDhyZCtfAEdnD7ANaL8mXtDw8WVX4vuDDZwz2ReAQoSGJs6HU15CV32e0TE5o0e3IOcZsA1MLYjFY3jC78svjV9TGKu8AL/b1NDxuE+pLwBFKCiJ3wunVAMN7OpTUnZL6vf9YqNPR9f/N3y3EWgygABCvgA8JnvmzGPhiPENOKgOT/Hw/FjiWnyernfhMqGA0BeAGu/0lUBzm7xY/DJfAApAEbkXAgA/oPe53heAxzzw5LhTIIL9HomgFvHHY2hIk9RRA+UV8N0EXwDu9QI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hrY8waN7er4xq/XM54Wo/Zkb+DNvTfaOBTwAnOI6hPffvbnG/o6+xUQC+QAOKBMQljTMgyEljaMiysvq4wIjQQqlxnLUcMDNryd4DPeYb/BwuGmoWJUQpnAAAAAElFTkSuQmCC', host: ['example.com'], popup: function (text) { - popupCenter('http://example.com', null, 800, screen.height); + popupCenter('https://example.com', null, 800, screen.height); }, custom: function (text) { settings(); @@ -388,6 +390,16 @@ shadow.appendChild(link); // 外部样式表 shadow.appendChild(icon); // 翻译图标加入 Shadow shadow.appendChild(backAndForward); // 前进后退按钮加入 Shadow + // 重定向 + var redirect_url = gm.get(gm.REDIRECT_URL, ''); + log('redirect_url:' + redirect_url); + if (redirect_url && window.location.host == 'example.com') { + document.documentElement.style.display = 'none'; + document.body.innerHTML = '' + redirect_url + ''; + document.querySelector('#redirect_url').click(); + gm.set(gm.REDIRECT_URL, ''); + return; + } // 弹出后的新页面判断是否进行自动化处理 var text = gm.get(gm.TEXT, ''); log(gm.TEXT + ': ' + text); @@ -449,7 +461,7 @@ }); /**日志输出*/ function log() { - var debug = false; + var debug = true; if (!debug) return; if (arguments) { @@ -505,6 +517,8 @@ } /**弹出居中窗口*/ function popupCenter(url, title, w, h) { + gm.set(gm.REDIRECT_URL, url); + url = 'https://example.com'; var x = screen.width / 2 - w / 2; var y = screen.height / 2 - h / 2; var win; diff --git a/translate/translate.png b/translate/translate.png deleted file mode 100755 index 468fcb9..0000000 Binary files a/translate/translate.png and /dev/null differ