commit 4dda66327d46163ff6e8600a84571ddd20aad8d1 Author: example Date: Wed May 2 12:01:26 2018 +0800 init diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4a26ed7 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +## Tampermonkey油猴子脚本 + +**部分预览图:** +![translate](translate/translate.png) + +**脚本下载地址:** +[https://greasyfork.org/](https://greasyfork.org/) + +**使用前:** +[https://tampermonkey.net/](https://tampermonkey.net/) +下载对应浏览器的扩展程序 + +Tampermonkey 是一款免费的浏览器扩展和最为流行的用户脚本管理器,它适用于 Chrome, Microsoft Edge, Safari, Opera Next, 和 Firefox。 + +虽然有些受支持的浏览器拥有原生的用户脚本支持,但 Tampermonkey 将在您的用户脚本管理方面提供更多的便利。 它提供了诸如便捷脚本安装、自动更新检查、标签中的脚本运行状况速览、内置的编辑器等众多功能, 同时Tampermonkey还有可能正常运行原本并不兼容的脚本。 + +它可以很快的安装好,来试一试吧! + +脚本名 | 用途 +-|- +translate|划词翻译调用“必应词典(必应翻译)、有道词典(有道翻译)、Google Translate(谷歌翻译)、Microsoft Translator(必应在线翻译)、金山词霸、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster”网页翻译 diff --git a/translate/deprecated-translate-v1.4.js b/translate/deprecated-translate-v1.4.js new file mode 100644 index 0000000..b71656f --- /dev/null +++ b/translate/deprecated-translate-v1.4.js @@ -0,0 +1,297 @@ +// ==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 new file mode 100755 index 0000000..d697587 Binary files /dev/null and b/translate/icon.psd differ diff --git a/translate/translate.js b/translate/translate.js new file mode 100644 index 0000000..afd3c15 --- /dev/null +++ b/translate/translate.js @@ -0,0 +1,383 @@ +// ==UserScript== +// @name Translate +// @namespace http://tampermonkey.net/ +// @version 3.1 +// @description 划词翻译调用“必应词典(必应翻译)、有道词典(有道翻译)、Google Translate(谷歌翻译)、Microsoft Translator(必应在线翻译)、金山词霸、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster”网页翻译 +// @author https://github.com/barrer +// @match http://*/* +// @include https://*/* +// @include file:///* +// @run-at document-end +// @grant GM_setValue +// @grant GM_getValue +// ==/UserScript== + +(function () { + 'use strict'; + + // Your code here... + var dataTransfer = { + beforePopup: function (popup) { + var text = window.getSelection().toString().trim(); + GM_setValue('barrer.translate.data.transfer.text', text); + popup(text); + }, + beforeCustom: function (custom) { + var text = GM_getValue('barrer.translate.data.transfer.text'); + GM_setValue('barrer.translate.data.transfer.text', ''); + custom(text); + }, + backAndForward: function () { + var backAndForwardDiv = document.createElement('div'), + backBtn = document.createElement('a'), + forwardBtn = document.createElement('a'), + closeBtn = document.createElement('a'), + btnStyle = '' + + 'text-decoration:none!important;' + + 'font-size:16px!important;' + + 'cursor:pointer!important;' + + 'display:inline!important;' + + 'padding:0!important;' + + 'margin:0!important;' + + 'margin-right:4px!important;' + + ''; + backAndForwardDiv.setAttribute('style', '' + + 'display:block!important;' + + 'position:fixed!important;' + + 'top:0!important;' + + 'left:0!important;' + + 'padding:0!important;' + + 'margin:0!important;' + + 'font-size:16px!important;' + + 'text-align:left!important;' + + 'border:0!important;' + + 'background:transparent!important;' + + 'z-index:2147483647!important;' + + ''); + backBtn.setAttribute('onclick', 'window.history.back()'); + forwardBtn.setAttribute('onclick', 'window.history.forward()'); + closeBtn.setAttribute('onclick', 'window.close()'); + backBtn.setAttribute('style', btnStyle); + forwardBtn.setAttribute('style', btnStyle); + closeBtn.setAttribute('style', btnStyle); + backBtn.innerHTML = '⬅️'; + forwardBtn.innerHTML = '➡️'; + closeBtn.innerHTML = '↪️️'; + backAndForwardDiv.appendChild(backBtn); + backAndForwardDiv.appendChild(forwardBtn); + backAndForwardDiv.appendChild(closeBtn); + document.documentElement.appendChild(backAndForwardDiv); + new Drag(backAndForwardDiv); + } + }; + var iconArray = [ + { + name: 'Bing 词典', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX///8NhIQNgoIWiYn8/v4RhYUcjIwUh4cOhIQhjo4pkpLt9vb7/f3z+fkwlpZYqqrV6urq9fWr1dUlkJCYy8uEwcHi8PA1mJjd7u49nJx7vLz5/PxAnp72+/vg7+9dra05mpq329twtrYtlJSgz89IoqKNxMTw9/d1urrn8/NBoaFps7P0+voZiorI4+PC4OBOpKTJ5OS12dnN5eW63Ny83d2a09Pl9fXl8vJksLCBv7+Lzc1UqKjF4uIPhYXZ6+uk0dGRx8eFyclfsbENgYGx19cRg4MOgoLQ5+cei4sOgIDy+Pjd8fFSp6dcq6vZ7Owtk5Nwvb294uLS6Oi+3t4MhIQumJjL6em8398Oh4dNoqI7nJwhkZFarq5hra1Wqqo7l5cPhIQOfX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ZAbg48M1pDgVr9HdGypj+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: '有道词典', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX////99PTpXV3ug4P74uL1uLjfGBjfFhbjMDDuhobpYmLfFRXfFxfiLi785ubiKSniLCzvjIz75OTviYn+9/fjODj86ur1urr86Oj++vroVlbwjo73yMjgGxvkODjqaWn51tbhJCT3wsLwlJTqYGD97+/gHh74ysrxl5fqZmbkOjr51dXyoqL98vLlQUH3xsbzqKj62tr4zs73w8PzpqbsdHTpYGDmSEjlRUX++PjkPT3+9fX74OD63NzwkpLnVFTjMzPiJyfgHBzfGhrteXn1trb//f3//Pz++/v++fn2wMD2urr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UUtR3QHCvHgyUSAUoJl0wEyraMZRktySXLdB9aCUKefNoNltWTeX4r8BTrIyOko61JgsA5eknm6w7pWMuZNKWAT7GRaLCsXUTeVsjItwGWtkWnrgjU8p1Sad7jsCSbUGJnVGYV2UM1SWd7NYOnlKLL1ZNahwgVg8uMFVj7sK2AjaHOTSZ07XGh+lsy66087DC9xbS+TSQ2FtUXkJsiK2MXr0Xixc3/xmkxy7SB/FNg26yWrAp+GF3YdnqscAEjLmvLWcU2otnsJN1Vm6tnxxkJjzvZKVW/u07CfTPrQtrc3Gn008ri9g27LPb6SuFh/3deYnks/o6L+AbDOAQEKjE3tAAAAAElFTkSuQmCC', + host: ['dict.youdao.com'], + popup: function (text) { + popupCenter('https://dict.youdao.com/w/eng/' + encodeURIComponent(text), null, 800, screen.height); + }, + custom: function (text) { + } + }, + { + name: 'Google Translate', + 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/tRkPVvpPdUkvUyb8EpAAAAAXRSTlMAQObYZgAABkNJREFUeF7V24WO7DgaBe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UCANAkrgcPhsKZACgk7j8p3IHktfUHGPEVwaAIvENnkkVqPzQ1EA8xTQex2fEt7oOGW0vfmzG2+EZ+ztxsMcCL1XhOjTLzkKKeAq7AFCOE5faBbOsryrE478BgO5+4uutwyTLt6KTv/bl9BwmuXYRVzse+RTiYpUozPFaEHCNR79NEN/sAUxR6yUutR2P6l0kMNWAGbyLxLX4tM4iCvG5NmCGNYW4hp7mizlIIFBH60ILxNfxZbOvkIAjiNb1KcT1+5frb9atEp8aaKBVoUHiu93Fk3UHCaTn0KKcmxHfFL4ovSeR3nW05jJJfImTKJ5EvYwEWPgMragXU8S3Xcefstsksj+MVoz6SeDZr4BRLwklN2DcSieJ+ErPntj/JqHZGIyquQfEd5JncqMktrkBY+ruAonESngm7yGxZAZGVIsJEknU8Fz2isT2Df15uKORT4Ea/qLcSRo8MejVKH4goXnOgbNtgjTMuss653fPk9jDCv5HdJKRBvY3H3Q4f1sgIfamDRyXi6TJMdmArJPvCyT2w7sqOKKHKmlSKqNRyMhsxUkDS3aDq9FFTdxN+3bQzPHULGliR1nw1SrUTDocvMlCLHQQuFVIW2cDIrEBRk0w52CgvQ08e+exk8ELRk3ct5UgUvtJoaaY4tosno74ns3xqn0kUrlw3jFqagQaqn0kJRV3pCtud1+xo6PjU7HPPZl0Oe5IhvK6Bi31PpKmqmOpVCKVKqiqQpL2Z46hrfGWrORpQzO7s2QF+dNNLugkq7BryGjfJmsoXQ1ICc5ak//QA0kvh8h87CGv5zRHjMw1P5TXd6EYI1NtBvegSzUyQOZRvs8YeMnso2JafucSDOgeMqmB/zAPQ+rnYTMq/MOXg1Eh9/g+tabwz54ojKtmJh2MjEuE53JoTbWta5wMYuG57hJaVt3t+g8ZoPRnzkowxV53IEF69WZqME8jP7k6wEhW4WJrow5z5apzgfAbiQ6scDv1TbUB85WyOd/w63GVNKiOoY7PoVzUwrffz39tLzo/qJzs8fupueCraLQEef8FWy3/BC6ewogAAAAASUVORK5CYII=', + host: ['translate.google.com'], + popup: function (text) { + popupCenter('https://translate.google.com', null, 800, screen.height); + }, + custom: function (text) { + var source = document.querySelector('#source'); + source.value = text; + tiggerEvent(source, 'input'); + tiggerEvent(source, 'keyup'); + document.querySelector('#gt-submit').click(); + } + }, + { + name: 'Microsoft Translator', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX////////V6NV2tHZGmkYkhyQujS5ZpVmXxpep0KnT59Pn8ucCdAILeQsPew8Oew4JeAkAcwAUfhQ1kDVmrGas0qzG4Mbs9ez3+/eIvogQfBAIeAgRfRFCmEJprWmn0Kfp8+ny+PJ0s3QGdgYZgRkriytVolWx1bHi7+L6/PqlzqUEdgQOeg4HdweDvIPO5M7+/v4EdQQLegshhSGZyJn0+fTw9/ChzKExjjEPfA/5/Pnl8eU/lj+VxpUMegx+uX5cplz4+/jk8OQpiim01rQliCVNnk09lT3Y6tj2+vY6lDo4kjj+//79/v3S5tJsrmwehB7Q5dD7/ftRoFFKnEpusG78/fy52bne7d7b7NvX6dfq9Orv9u95tnnt9e2Rw5Hg7uBfqF9lq2Xa69qFvYW32LfJ4smBuoHM48wWgBbD3sMrjCtIm0iMwIy/3L8cgxySxJKfy5/w+PDQ5tD1+vWdyZ1hqWFxsXFQn1BXo1f3+vdgp2C827wHeAf2+/a417gtAEeJAAAAAXRSTlMAQObYZgAACylJREFUeAHF2mdD20jQB/ARvXi1ip1QRobDiGpuAwIMiLJU2zTTj967uRAn19KufPSnkHAaGdlWnNj3e5kA+9dodrUq4IlSUlpWXlFZVV1TC/+J2gofU7n2zF8ReP6irr4Biq3Rhw+4piMPNjX/0BKComrVkdCMtvaOzq5uKJ5wz49IcY2JwMvePiiWhmaTcXTS+wcGI1AsQ8Mjfl1FB6tftI5CsShj1eOcoxM3foAiGpuQanqCDigmZVJYaQGmIN101wwUTO0sQwcRBmpsbnJ8NloeaxyDwqiblUip/hawzQzGmeDIVCnG5wsUwK8iZXYswKPI8CIXj//tWwpBASyHn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wnOWf/iTa+ng+gKlwUFEqpYm2iArxLZ2UpZ5pdzyJlhpJLng11ehu+unQgEdRUJhrH9bfhav72erAykLKZJNTXS8dMLbxVc2L+p4BpHgono4AHkJTIzvzJ392Jlvis0DR40/Nm6NCsYUpZYK72A4khMcsYZUpIFO64boDiUHUOiA9dSr6ojUCyjf/iQkiIZu6qH4mk4IwG41FNTcwtQTH2d/3a/avpnL69DUGQf3/0lLESm8eTUi3n4DzQMB4I+MTs+cReB/8jM8P39bT6rzv8CoTxF395hjrkAAAAASUVORK5CYII=', + host: ['www.bing.com', 'cn.bing.com'], + popup: function (text) { + popupCenter('https://www.bing.com/translator', null, 800, screen.height); + }, + custom: function (text) { + if (window.location.href.indexOf('bing.com/translator') != -1) { + document.querySelector('#t_tl').value = 'zh-CHS'; + var source = document.querySelector('#t_sv'); + source.value = text; + tiggerEvent(source, 'input'); + } + } + }, + { + name: '金山词霸', + 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: '海词词典', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX///8ArvoArfoBrvrl9v4ArPoCr/oGsPoEr/oDr/oKsfr8/v8uvfoIsPkMsfme4P0xvvsjufk6wftjzfyL2vwRs/oVtPoIsPrT8f7s+f4tvfpu0fzY8/4ArfsEr/mF2Psatvoou/pBw/v5/f+05/110/zF7f7f9f5p0PxZyvyV3v0Ksfnx+/81v/set/pcy/un4/xnz/zL7v1Ox/zq+P5Uyfwmuvnh9v7t+f/2/P+q5P0rvPpezPzs+f/t+f4hufoLsvqZ3/30+/7B7P5SyPyu5v0iuPuR3Pyx5v1RyPoiuvpRyPwnu/q36P2X3fpUyPosvPgAq/pJxvpu0PovvPhZyvsguPuj4f2y5vtQx/kht/cuvvpOxvpRyvwyvfru+v8tu/kDrvoAq/sTtPkUs/rP8P4hufm66P3A6vtBwfcyvPd71fy/6v0Ksvup2evl9ftJwfWB1vr9/Pzs+P0PtPuq4PYDrvs+vvYDr/vW6vPh8fZIx/wArfkHr/me2/NSy/wt4PUVAAAAAXRSTlMAQObYZgAABXFJREFUeF7N2/WP8koUx+HzPVPDXdfd3d1ed3d3u+7+r1/CZnvbhZ2Wh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MV3lQMKkDanGqCZkLapGjAYhrQEEaVVLsIeC9LmiWiZFQKe6JDEZgVAVxQCFlMsZIB7mmLAfIEha4oUT0GCIUsfUg24JQeELigGzP8FaeaiYkDW8x9jtYCBJOR1kFrANXj0Xi1guwx5u0W1gISAtFCSlAK27sGjz0oBkU2GR/eVAhIvIY/jGlXbgArAh6/YCzAToWo3VAC2exleXSB1Z2ArzfCIe1eOANxywPN+hlc8R8rOwFZawDPjwxHgRasBV8sMz/RbESI1i/B8AT7is6QGUBwz4CNObSsBTHaEGb66Rg5Aq/6iOcim4C/9yiTZ3RGy8X+8Tv4qrveb8BvPOtzPLAkgnr9bWl1dLZXso7tSaVvTtPeJobQJ/3E/OUoKSVYsf6nSzs6OfXT17t1OLhw2DGY0UOiAHPWxXKuzrrMkNBzPRcjRBqO9cXyFAgXos+QG6GhrPEOBAjhfChYQ+kJEQa6BHgoUwBkKFMDpCBEFtwY4uUKBAnZGKFDAvU4KFHCpk4IEsD1+MACOdlKggLsjFCSgu4MoSEAhEQkU8OwLSVJ9KWZrqEQBAowbB0QBAs6NT1JwAA7f1ogCA3C8o0gUFIDF9O0i+auso8UxCv1nt4iCAXShe0pyw61aAIuXrz/1DK9RQ126qdeLK+m+4i773vPxB6V9arRM9PHjx9FotFwtetSNSmVHUbtyufoKuzufzmRuJ0579/2/tTbTKCdEjikAAAAASUVORK5CYII=', + host: ['dict.cn', 'hanyu.dict.cn', 'abbr.dict.cn', 'ename.dict.cn'], + popup: function (text) { + popupCenter('http://dict.cn/' + encodeURIComponent(text), null, 800, screen.height); + }, + custom: function (text) { + } + }, + { + name: '百度翻译', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX///8dbvEkc/EhcfHL3fwpdvJVkvR9q/eavvlIivRuovbZ5/2syvrl7/250vt1pvbi7f3d6f2Ot/geb/G0z/rs8/620Po6gfM1fvMabPHF2ftxpPZonvZSkPQxe/JMjPQsePKDr/f5+//t9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EyiJeeA50AxQjn/+llGGzB9Mvm4AYV2HsXJQpT2cZ3zV+OuvhfwP5D0AnoBE/YuB3hTXQ7wgLBE5mhAlupAQI4/NxKxm9+bZNu+vSIu77Y+gH8QeeIV61E7LZpWLVvejTD/07G028KApJ1m5u7A9rFOp+t3BWiDcmQwBU0HpKJHu3rZyiqH5zZIGVU/YDOWUs0HrOuGNMZRbBFLoukA2FRgC/2INR0A+SESW2btffMBoD/FppywqYfm2PZkbwiAXAjF+bJXoTjWMabSLTkJVdUCoqRmC5YekK0vUhFrx1GsKjmdPqVSuW82semvhkQdxdID4Gp1JQmvHfm4O9DKAFH+dHU5YAO7HKD7PwvoBfQCct0O8IAk05IDrlMghQJfhN4W8MUOUpxLC5D+1UwrezFwKSGgg/gBvYBegOusywGW4a4GaO6HoWsBIaXMnILOO8YK+Zes8n0CuuKRVO+rPMORODShp6en53+E0G/h7siGWgAAAABJRU5ErkJggg==', + host: ['fanyi.baidu.com'], + popup: function (text) { + popupCenter('https://fanyi.baidu.com/#en/zh/' + encodeURIComponent(text), null, 1024, screen.height); + }, + custom: function (text) { + } + }, + { + name: 'Oxford Learner\'s Dictionaries', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAwFBMVEX////6+PPx7Mz00YDtxVPVsVfkrSOrrJvd3MzRmBzwuCfusRfdpBr6wi2scgMxNQf81TnT0a+8fQJiRwonJhe+hwmNag6xiy7NjgiioV6hZQHy75fv4OZoVxzdmwZ7YiGJbCuYezgQGQJeaS5yc12IVwNNTiY/Swno7IPJ0nS3xFSpuzSBmwPG00nc43LT3Vm3yC2XrSqSrQWlvAtsiAJ7jyxNZAFddwFCCRrhpL7VhqaSP13px9fFb5FuKUGvV3jbwFaYAAAAAXRSTlMAQObYZgAAEEJJREFUeAHsltGamzgMhZcA6liSDQMxOLQAyTRk9/1fcCUb0u3tkunVHAB939zon2OdiL++9Hp96UtZlp3yvCiKEsoiL7+9yR/+YHdpXhiD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+ELiVE/y2npXsfD5G6br37pz71qb8BRUHIGKi3vsoAAAAASUVORK5CYII=', + host: ['www.oxfordlearnersdictionaries.com'], + popup: function (text) { + popupCenter('https://www.oxfordlearnersdictionaries.com/definition/english', null, 800, screen.height); + }, + custom: function (text) { + document.querySelector('.searchfield_input').value = text; + document.querySelector('#search-btn input').click(); + } + }, + { + name: 'Oxford Dictionaries', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX////8/v/5/f/p+f7c9v3N8v247fyW5Pp93fhm2PdT0vZGz/Y3zPUwyfQpyPUtyfQ0yvU8zfVL0fZe1vd12/iO4vqm6PvD7/zV9P3h9/3y/P7i+P3F8PyF4Plh1vdBzfUnx/QUwvMNwPMLwPMIv/IFvvIDvvIBvfIAvfIQwfMcxfNP0vZ53fia5fm66/v1/P/e9/2r6fsAvvIaxPNp2ffw+/637PsgxfQAvPL4/f+U4/okxvSC3vkjxvTs+v4kx/P6/v9u2fjH8fwSwvOi5/oyyfUWw/O97vwCv/HA7/xW0/aJ3voBwPFp1/cbw/MOwfMGwfAVwfTZ9f3l+P6y6/ud5vpH0PzI8f3D9P3W9fpa1PcXxfRk1/cdxfSR4/nR8/2K4fm+7foAvPHK8fzT9P206fsuyPQYxPMew/Sv6/u57/xx2vi07PsZw/MhyPS/8PwyxvPU8/2D3fcryfWs5/pX1/3U8/e67ftj2PgzzPaQ3/c/0fZ64fj5/v/X8/tJ0/lwlwy1AAAAAXRSTlMAQObYZgAACJlJREFUeAHt2fdfIkkax/GnaBhRyUmCCkI3/UVw24SKIpLUhQ3uwbjuseLkmZ3V2Rzm8p9+oS85r6qGQpvXxfevj+FD6OpQNLH/Yw7F6Xow456dm/d4fX/mDwRD4Ug0thBPJNnU/3lqMba0nM6sZHOqltehm/KaqmYLq4Fiae29uMGm99/XN9zFjIoRNrfS2zOLZZoCh7LjLu7uYbycp6SQ3SrO/bkDyFqNk72Srmq6AHmHtgYwZTGSyW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2ZJLFvS7uwspn+Vmrd4mUizSTJSMTmPwGH2w8V6hVhLX9cWijTOM5Yd7gJS2cfJGmUiyBG0PzXr12jLtR6T65CWxghG6nRaK+HGEV/E9xeW+wL71x//6Ia8uUwijbbpzGS1QJG2yscd0vnO651JelgdcYclXI/fhqLNv7wlYoxinEaSykVMF7LFwwNZiPuarVaul6eS3tXVYw3/4wkKO4CJOU1NadqkPR0vklSaqUzTENwkST1IznYz/eQpPVLBdjt+Ic6yau1A5uwUy7cZBNeTAT3YJ+VUoom9ayrwSab3vMyTc5ZOoE9ip063UU5loYNCtc9uiMWrx7hnvR0rEZ3Z+zM414Ol+J1ug8Wj86f4a4ykSdJui+j1w61cAf6UcRVY2SDeio2OMSECp7SRZnswso/bwdUyDvs7vcMshMznkUH/jxktNKRG8VBtqsrPz8efK9itK1049xVYTQVrK4sxqoDz+pZTtX0P4MJup7Pa2p2JRO6ntmJG4ymiVWU+EJs6TLk8X5/tLv6Z8PDjD+QHkSublyJMqP/m9CfAEzoM7Az/eTVAAAAAElFTkSuQmCC', + host: ['en.oxforddictionaries.com'], + popup: function (text) { + popupCenter('https://en.oxforddictionaries.com', null, 800, screen.height); + }, + custom: function (text) { + document.querySelector('#query').value = text; + document.querySelector('button[data-value="Launch search"]').click(); + } + }, + { + name: 'Merriam-Webster', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX//////v3//fj++vL+9OL98dv97dL86MT85Ln61pb5yHf5zYL72qP++O3736760Yv1t0T1tkv1s0P3u1f1wV34w2r4vmD4skL5tEn2qy71sTv2uk7+9un2rjb8z4//+/v+8fH96+v85eX84uL739/729v96Oj97u7++fn+9fX6zMz6xML4rqzziofzeXjuZ2PvXFrrUEvvSkfrSUPsWFPuYl/xcGzwhoL5v773x8b72Nf+9/f3rz/60M/5trj0mJbqPjvqLSnqJSLpFRHmFxLlHhnmIRjmIxzlKB/nJSDmIB7pHhrpGhXpGBjqIh3rODTxam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gCBBKvYYp9brTqNeFTr3yiijwEgFQhqWpwbkebbI+fybnaYR6sT3BnYt9xm7ro8oyVGUoQZUQjAmn5LVB4UQCMYGAgOIq5LmHoUf9jtIRz7kdlsa5nz+Wivt17revcz95sSiIWAKQiASLogCJJGJ5tcC43/zbHv1vcfo3o8Dj7DfgcW9h7SHPqUuLq8tFxCO+sHyytAjF0sTI4cbAF/AYmqXg0TDy6XSnc/Fvyefj1dDpyOjD2MTEuEY+d66v/trc7/j4iXx6Y+k0JZ+Gole7P56LuL9Brz1t7cy8UvX6Fb2aX2nodTZmNHrVjwh7s8ad42XZbyASzmUCdt/T8Ocmc1aDz6FUjsJnm5W5Z7PZbLFkNflsD7g/w2fLk9PvZncwmA6HIvF4XJPflH4Hw4mEu5nR7/8Tv/s9bm1wUQbv+ITf/7zhPxvujQOwfSS6AAAAAElFTkSuQmCC', + host: ['www.merriam-webster.com'], + popup: function (text) { + popupCenter('https://www.merriam-webster.com', null, 800, screen.height); + }, + custom: function (text) { + document.querySelector('#s-term').value = text; + document.querySelector('.s-frm').submit(); + } + } + ], hostCustomMap = {}; + iconArray.forEach(function (obj) { + obj.host.forEach(function (host) {// 赋值DOM加载后的自定义方法Map + hostCustomMap[host] = obj.custom; + }); + }); + var text = GM_getValue('barrer.translate.data.transfer.text'); + log('barrer.translate.data.transfer.text: ' + text); + if (text && window.location.host in hostCustomMap) { + dataTransfer.beforeCustom(hostCustomMap[window.location.host]); + } + if (window.location.host in hostCustomMap) { + document.onkeydown = escExit; + dataTransfer.backAndForward();// add back and forward button + } + + log('url: ' + window.location.href); + // 翻译图标 + var icon = document.createElement('div'); + // 绑定图标拖动事件 + var iconDrag = new Drag(icon); + iconArray.forEach(function (obj) { + var img = document.createElement('img'); + img.setAttribute('src', obj.image); + img.setAttribute('alt', obj.name); + img.setAttribute('title', obj.name); + img.addEventListener('mouseup', function () { + if (iconDrag.elementOriginalLeft == parseInt(icon.style.left) + && iconDrag.elementOriginalTop == parseInt(icon.style.top))// 没有拖动鼠标抬起的时候触发点击事件 + dataTransfer.beforePopup(obj.popup); + }); + img.setAttribute('style', '' + + 'cursor:pointer!important;' + + 'display:inline-block!important;' + + 'width:22px!important;' + + 'height:22px!important;' + + 'border:0!important;' + + 'background-color:rgba(255,255,255,1)!important;' + + 'padding:0!important;' + + 'margin:0!important;' + + 'margin-right:5px!important;' + + ''); + icon.appendChild(img); + }); + icon.setAttribute('style', '' + + 'display:none!important;' + + 'position:absolute!important;' + + 'padding:0!important;' + + 'margin:0!important;' + + 'font-size:13px!important;' + + 'text-align:left!important;' + + 'border:0!important;' + + 'background:transparent!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'; + } + }); + // 鼠标事件:防止选中的文本消失;显示、隐藏翻译图标 + document.addEventListener('mouseup', function (e) { + if (e.target == icon || (e.target.parentNode && e.target.parentNode == icon)) {// 点击了翻译图标 + e.preventDefault(); + return; + } + var text = window.getSelection().toString().trim(); + log('click text:' + text); + log(e); + 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'; + // 强制设置鼠标拖动事件结束,防止由于网页本身的其它鼠标事件冲突而导致没有侦测到:mouseup + iconDrag.dragging = false; + iconDrag.unsetMouseMove(); + } + }); + + /**日志输出*/ + function log() { + var debug = false; + if (!debug) + return; + if (arguments) { + for (var i = 0; i < arguments.length; i++) { + console.log(arguments[i]); + } + } + } + + /**Esc键关闭窗口*/ + function escExit(e) { + e = e || window.event; + var isEscape = false; + if ("key" in e) + isEscape = (e.key == "Escape" || e.key == "Esc"); + else + isEscape = (e.keyCode == 27); + if (isEscape) + window.close(); + } + + /**触发事件*/ + function tiggerEvent(el, type) { + if ('createEvent' in document) {// modern browsers, IE9+ + var e = document.createEvent('HTMLEvents'); + e.initEvent(type, false, true);// event.initEvent(type, bubbles, cancelable); + el.dispatchEvent(e); + } else {// IE 8 + var e = document.createEventObject(); + e.eventType = type; + el.fireEvent('on' + e.eventType, e); + } + } + + /**弹出居中窗口*/ + function popupCenter(url, title, w, h) { + var x = screen.width / 2 - w / 2; + var y = screen.height / 2 - h / 2; + var win; + try { + win = window.open('', title, 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + y + ', left=' + x); + win.opener = null; + win.location = url; + } catch (e) { + win = window.open(url, title, 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + y + ', left=' + x); + log(e); + } + if (window.focus) { + win.focus(); + } + return win; + } + + /**鼠标拖动*/ + function Drag(element) { + this.dragging = false; + this.mouseDownPositionX = 0; + this.mouseDownPositionY = 0; + this.elementOriginalLeft = 0; + this.elementOriginalTop = 0; + var ref = this; + this.startDrag = function (e) { + e.preventDefault(); + ref.dragging = true; + ref.mouseDownPositionX = e.clientX; + ref.mouseDownPositionY = e.clientY; + ref.elementOriginalLeft = parseInt(element.style.left); + ref.elementOriginalTop = parseInt(element.style.top); + // set mousemove event + window.addEventListener('mousemove', ref.dragElement); + log('startDrag'); + }; + this.unsetMouseMove = function () { + // unset mousemove event + window.removeEventListener('mousemove', ref.dragElement); + }; + this.stopDrag = function (e) { + e.preventDefault(); + ref.dragging = false; + ref.unsetMouseMove(); + log('stopDrag'); + }; + this.dragElement = function (e) { + log('dragging'); + if (!ref.dragging) + return; + e.preventDefault(); + // move element + element.style.left = ref.elementOriginalLeft + (e.clientX - ref.mouseDownPositionX) + 'px'; + element.style.top = ref.elementOriginalTop + (e.clientY - ref.mouseDownPositionY) + 'px'; + log('dragElement'); + }; + element.onmousedown = this.startDrag; + element.onmouseup = this.stopDrag; + } +})(); \ No newline at end of file diff --git a/translate/translate.png b/translate/translate.png new file mode 100755 index 0000000..073e58b Binary files /dev/null and b/translate/translate.png differ