diff --git a/README.md b/README.md index 090ea13..11b9d60 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ ### translate.js -![translate.jpg](translate/translate.jpg) +![translate.png](translate/translate.png) 特色: -* 划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典、PDF 划词翻译”网页翻译 +* 划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典、PDF 划词翻译、Google Search、Bing Search(必应搜索)、百度搜索、Wikipedia Search(维基百科搜索)”网页翻译 * 支持顺序自定义 * 支持隐藏图标 * 支持显示更多图标 @@ -15,19 +15,18 @@ ### translate-dictionary.js -![translate-dictionary.jpg](translate/translate-dictionary.jpg) +![translate-dictionary.png](translate/translate-dictionary.png) 特色: * 划词翻译调用“有道词典(有道翻译)、金山词霸、Bing 词典(必应词典)、剑桥高阶、沪江小D、谷歌翻译” * 支持发音 * 支持显示当前翻译引擎 * 支持面板拖动 +* 支持面板自动调整位置 -### translate.js *and* translate-dictionary.js +### PDF 划词翻译(PDF.js viewer) -![translate-bundle.jpg](translate/translate-bundle.jpg) - -![translate-pdf.jpg](translate/translate-pdf.jpg) +![translate-pdf.png](translate/translate-pdf.png) 同时安装: @@ -54,5 +53,5 @@ Tampermonkey 是一款免费的浏览器扩展和最为流行的用户脚本管 脚本名 | 用途 -|- -translate.js|划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典、PDF 划词翻译”网页翻译 +translate.js|划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典、PDF 划词翻译、Google Search、Bing Search(必应搜索)、百度搜索、Wikipedia Search(维基百科搜索)”网页翻译 translate-dictionary.js|划词翻译调用“有道词典(有道翻译)、金山词霸、Bing 词典(必应词典)、剑桥高阶、沪江小D、谷歌翻译” diff --git a/translate/translate-bundle.jpg b/translate/translate-bundle.jpg deleted file mode 100644 index 0da6515..0000000 Binary files a/translate/translate-bundle.jpg and /dev/null differ diff --git a/translate/translate-dictionary.jpg b/translate/translate-dictionary.jpg deleted file mode 100644 index f6e824e..0000000 Binary files a/translate/translate-dictionary.jpg and /dev/null differ diff --git a/translate/translate-dictionary.js b/translate/translate-dictionary.js index 07c1b47..0c5229b 100644 --- a/translate/translate-dictionary.js +++ b/translate/translate-dictionary.js @@ -1,7 +1,7 @@ // ==UserScript== // @name 划词翻译:多词典查询 // @namespace http://tampermonkey.net/ -// @version 3.1 +// @version 3.2 // @description 划词翻译调用“有道词典(有道翻译)、金山词霸、Bing 词典(必应词典)、剑桥高阶、沪江小D、谷歌翻译” // @author https://github.com/barrer // @match http://*/* @@ -29,11 +29,13 @@ *{word-wrap:break-word!important;word-break:break-word!important} a{color:#36f;text-decoration:none;cursor:pointer} a:hover{text-decoration:underline} - img{cursor:pointer;display:inline-block;width:22px;height:22px;border:1px solid #dfe1e5;border-radius:22px;background-color:rgba(255,255,255,1);padding:2px;margin:0;margin-right:5px;box-sizing:content-box;vertical-align:middle} + img{cursor:pointer;display:inline-block;width:22px;height:22px;border:1px solid #dfe1e5;background-color:rgba(255,255,255,1);padding:2px;margin:0;margin-right:5px;box-sizing:content-box;vertical-align:middle} img:last-of-type{margin-right:auto} img:hover{border:1px solid #c6c6c6;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.1);box-shadow:1px 1px 3px rgba(0,0,0,0.1)} - img[activate]{border:1px solid transparent;-webkit-box-shadow:0 0 0 1px #f90;box-shadow:0 0 0 1px #f90} - tr-icon{display:none;position:absolute;padding:2px;margin:0;cursor:move;box-sizing:content-box;font-size:13px;text-align:left;border:0;color:black;z-index:2147483647;background:#fff;border-radius:2px;-webkit-box-shadow:0 3px 8px 0 rgba(0,0,0,0.2),0 0 0 1px rgba(0,0,0,0.08);box-shadow:0 3px 8px 0 rgba(0,0,0,0.2),0 0 0 1px rgba(0,0,0,0.08)} + img[activate]{border:1px solid #f90} + img[activate]:hover{border:1px solid #f90;-webkit-box-shadow:unset;box-shadow:unset} + tr-icon{display:none;position:absolute;padding:0;margin:0;cursor:move;box-sizing:content-box;font-size:13px;text-align:left;border:0;color:black;z-index:2147483647;background:transparent} + tr-icon[activate]{background:#fff;-webkit-box-shadow:0 3px 8px 0 rgba(0,0,0,0.2),0 0 0 0 rgba(0,0,0,0.08);box-shadow:0 3px 8px 0 rgba(0,0,0,0.2),0 0 0 0 rgba(0,0,0,0.08)} tr-audio{display:block;margin-bottom:5px} tr-audio a{margin-right:1em;font-size:80%} tr-audio a:last-of-type{margin-right:auto} @@ -103,7 +105,7 @@ .cambridge .pos-body{margin-left:1em} .iciba strong{font-size:1em;font-weight:normal} .iciba p{padding:0;margin:0} - .iciba .icIBahyI-footer{display:none} + .iciba .icIBahyI-footer,.iciba .icIBahyI-suggest{display:none} .iciba .icIBahyI-prons{color:#777} .iciba .icIBahyI-eg{margin-right:1em} `; @@ -318,6 +320,7 @@ if (engineId == obj.id) { return; // 已经是当前翻译引擎 } + icon.setAttribute('activate', 'activate'); // 标注面板展开 contentList.innerHTML = ''; // 清空翻译内容列表 displayContent(); // 立马显示翻译面板 content.scrollTop = 0; // 翻译面板滚动到顶端 @@ -601,25 +604,10 @@ engineResult[id] = value; } } - /**翻译引擎结果集状态判断*/ - function isAllDone() { - var rst = true; - var count = 0; - idsType.forEach(function (id) { - if (count < 0) { // 判断指定数量的完成情况 - count++; - if (!(id in engineResult)) { - log('isAllDone(not found):' + id); - rst = false; - } - } - }); - return rst; - } /**显示内容面板*/ function displayContent() { - var panelHeight = 241 + 8; // icon 展开后总高度 - var panelWidth = 320 + 8; // icon 展开后总宽度 + var panelHeight = 237 + 8; // icon 展开后总高度 + var panelWidth = 316 + 8; // icon 展开后总宽度 // 计算位置 log('content position:', 'window.scrollY', window.scrollY, @@ -655,12 +643,6 @@ } /**内容面板填充数据*/ function showContent() { - log('showContent:', idsType, engineResult); - if (isAllDone()) { - log('showContent allDone'); - } else { - return; - } log('showContent rendering'); // 发音 audioEngines = []; // 清空防止多次渲染 @@ -711,6 +693,7 @@ title.setAttribute('rel', 'noreferrer noopener'); title.setAttribute('target', '_blank'); title.setAttribute('href', href); + title.setAttribute('title', '打开源网站'); contentList.appendChild(title); } contentList.appendChild(engineResult[id]); @@ -734,6 +717,7 @@ /**隐藏 icon*/ function hideIcon() { icon.style.display = 'none'; + icon.removeAttribute('activate'); // 标注面板关闭 content.style.display = 'none'; engineId = ''; engineTriggerTime = 0; @@ -760,6 +744,7 @@ type.innerHTML = obj.name; type.setAttribute('href', 'javascript:void(0)'); type.setAttribute('class', 'audio-button'); + type.setAttribute('title', '点击发音'); type.addEventListener('mouseup', function () { play(obj); }); diff --git a/translate/translate-dictionary.png b/translate/translate-dictionary.png new file mode 100644 index 0000000..f0bc429 Binary files /dev/null and b/translate/translate-dictionary.png differ diff --git a/translate/translate-pdf.jpg b/translate/translate-pdf.jpg deleted file mode 100644 index ef4fb8d..0000000 Binary files a/translate/translate-pdf.jpg and /dev/null differ diff --git a/translate/translate-pdf.png b/translate/translate-pdf.png new file mode 100644 index 0000000..e21c822 Binary files /dev/null and b/translate/translate-pdf.png differ diff --git a/translate/translate.jpg b/translate/translate.jpg deleted file mode 100644 index 716fcf6..0000000 Binary files a/translate/translate.jpg and /dev/null differ diff --git a/translate/translate.js b/translate/translate.js index ba150dc..bb9877b 100644 --- a/translate/translate.js +++ b/translate/translate.js @@ -1,8 +1,8 @@ // ==UserScript== // @name Translate // @namespace http://tampermonkey.net/ -// @version 4.5 -// @description 划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典、PDF 划词翻译”网页翻译 +// @version 4.6 +// @description 划词翻译调用“金山词霸、有道词典(有道翻译)、Google Translate(谷歌翻译)、沪江小D、搜狗翻译、必应词典(必应翻译)、Microsoft Translator(必应在线翻译)、海词词典、百度翻译、Oxford Learner's Dictionaries、Oxford Dictionaries、Merriam-Webster、汉典、PDF 划词翻译、Google Search、Bing Search(必应搜索)、百度搜索、Wikipedia Search(维基百科搜索)”网页翻译 // @author https://github.com/barrer // @match http://*/* // @include https://*/* @@ -21,12 +21,13 @@ var style = document.createElement('style'); style.textContent = ` *{word-wrap:break-word!important} - img{cursor:pointer;display:inline-block;width:22px;height:22px;border:1px solid #dfe1e5;border-radius:22px;background-color:rgba(255,255,255,1);padding:2px;margin:0;margin-right:5px;box-sizing:content-box;vertical-align:middle} + img{cursor:pointer;display:inline-block;width:22px;height:22px;border:1px solid #dfe1e5;background-color:rgba(255,255,255,1);padding:2px;margin:0;margin-right:5px;box-sizing:content-box;vertical-align:middle} img:last-of-type{margin-right:auto} img:hover{border:1px solid #c6c6c6;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.1);box-shadow:1px 1px 3px rgba(0,0,0,0.1)} tr-icon{display:none;position:absolute;padding:0;margin:0;cursor:move;background:transparent;box-sizing:content-box;font-size:13px;text-align:left;border:0;color:black;z-index:2147473647} tr-back-forward{display:none;position:fixed;top:0;left:0;padding:0;margin:0;font-size:16px;text-align:left;border:0;cursor:move;background:transparent;z-index:2147473647} tr-back-forward a{text-decoration:none;font-size:16px;cursor:pointer;display:inline;padding:0;margin:0;margin-right:4px} + tr-back-forward a:last-of-type{margin-right:auto} `; // iframe 工具库 var iframe = document.createElement('iframe'); @@ -63,32 +64,18 @@ beforeCustom: function (custom) { var text = gm.get(gm.TEXT, ''); gm.set(gm.TEXT, ''); - custom(text); - }, - getBackAndForward: function () { - var backAndForwardDiv = document.createElement('tr-back-forward'), - backBtn = document.createElement('a'), - forwardBtn = document.createElement('a'), - closeBtn = document.createElement('a'); - backBtn.setAttribute('onclick', 'window.history.back()'); - forwardBtn.setAttribute('onclick', 'window.history.forward()'); - closeBtn.setAttribute('onclick', 'window.close()'); - backBtn.innerHTML = '⬅️'; - forwardBtn.innerHTML = '➡️'; - closeBtn.innerHTML = '↪️️'; - backAndForwardDiv.appendChild(backBtn); - backAndForwardDiv.appendChild(forwardBtn); - backAndForwardDiv.appendChild(closeBtn); - return backAndForwardDiv; + custom.forEach(function (cus) { + cus(text); + }); } }; var iconArray = [{ 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+3t4MhIQumJjL6em8398Oh4dNoqI7nJwhkZFarq5hra1Wqqo7l5cPhIQOfX1VqalhuLim3d16xcUslpZUqqofkJAajIwmlJS95+c4paWy2NiWzc0PiIgch4e929u139+z398nmZlXrq70/f1ErKzH5OROqKi34eEki4uq2NhRqKjA39/oIzviAAAAAXRSTlMA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hwI0/1mAlSjesoLjuHMIwFmEp2kAIXF/Hv/7AA7AjwN+Iu3PnSsuSYtikWKacuB2g6IKlKrwPJC5apVhoESMFuCcGG97Z+c77o8rGiaSt75A4BbKAQlShYLKWdWbI+1A/y+muVO/9/i64h4TMfD8+cttQeC4QollwzJkmJEC+jF1w5ic9rS7jsoOJlJUpkiGWV+Tz+dlFQmgn9XW3MyL48+dhEsQRFGr7vqOFAYVoB9ndPKNp33s6LhjSax4QQKevwP03wx+tID+vojic/7U3uec+6oaycBmk6Jp0JSCpRLHqYBUFLleqFI0ACMB9PdFb3v+0X6XriQikVCIaZJKOKwomkYT9ZJmRS0QDDM6QD/Gh8nx9t519sZ1RWMXJFn2FVSV5sYEoV5nKASAXnRn683vqdlcpRMTMUwkfQfbR+UmpGCdQAOwYprG+eTdr2jrHQHD6GbQiiTIqAB9hRl1Pp32Tjk63w4PMxrN85BHCOhH152reOqdoxNLXFGiSDdv+eeNPgChwnD+dnn8JedOUBHqYittx5/Xpmltz1OP9btcDJuf6AOQI0zDaPlT/iHOH4/5D9P5Zog1Z0oWAAAAAElFTkSuQmCC', + host: ['www.bing.com', 'cn.bing.com'], popup: function (text) { - popupCenter('https://www4.bing.com/dict/search?q=' + encodeURIComponent(text), null, 800, screen.height); + popupCenter('https://cn.bing.com/dict/search?q=' + encodeURIComponent(text), null, 800, screen.height); }, custom: function (text) {} }, @@ -147,7 +134,7 @@ { name: 'Google Translate', id: 'googleCom', - 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/zC2PtWkvVgmfZhm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i3EwyYsgEK4WfDKq2DwGJjYhhHcZVRdXc0CKIE9KR+9DQf3BgydFCJPCtfX1/u7AAweXmnr7PM2IGwYOWso+SwBCmDloOTlVuFr70Ny3lLG7WY+C6DhkORlr/dlwOlDpfj4eJ+7hChAIockL1OxDHR5WgboHUUoAR2+9wJs4JDk507Ra6n+xhFsDRPhey/ADwQGOCR52ZdKlAE/IEj4B0owiUOSvwy0d/X5pQBDEkRzUHKXgVf+K8DQnYDLgXzsT/3g1wIgQ3OCDQKJAhop+wTcFPqKqwH/FkBNjJ2d0SYAI8XaoyXQ06Pzm/BZgDkZJ0Yq/GX7i6Gr26/CZwHGz8r6yUiEP39nIbR3aP13GahmxszOaJcz/BmbC0DT2kMHwAL4xTzgpFzhT1qfBw0t3f4aPguAjJv77KdyhP/3lTlQXU/v6Q9wAbgM/Hl5DpRVd/hr6CwAIcApqcL/w5JsKChr9+fQCQF4HvAzKcL/zYIsyCpsVULwLAAhQYcv4U+clwmPsjWKCJ0FIBg3J/20t+GPn5sJN5/Qx7lZAIUwZlbmz70Jf9ycDEi816TE8AkBuAx0eirApTRiV65iBWABzngSftjlGsUGzwIQjJ+b9Qt3wz92oUrp4SMWDt6GoCD4Rgi3y1X4e8LKAyF8pImDH8bYWRlnnYW/5VQZaHW6QBHgKoc+jHGz038pFv7qwyXQ3RMw4SPrOHS6DHQPD3/J3iLo7Aqo8HUC3+XQCcbMyQy2DX/O9gJobe8JpPCRvwoEceAEY2dmjBkKf9rGfGh5HnDhHxcIciIAl4HfL8569++1edDQ3B1IwfcI/FEgiAVwwaYTpber6joNwn/rFcwXgVqBWIEVAt+x+zlZAOZ/xxy2X2J2T5MAAAAASUVORK5CYII=', host: ['translate.google.com'], popup: function (text) { popupCenter('https://translate.google.com', null, 800, screen.height); @@ -163,13 +150,17 @@ name: 'Microsoft Translator', id: 'bingTrans', image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAABgFBMVEX////////V6NV2tHZ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L69DUGQf3/0lLESm8eTUi3n4DzQMB4I+MTs+cReB/8jM8P39bT6rzv8CoTxF395hjrkAAAAASUVORK5CYII=', - host: ['www.bing.com', 'cn.bing.com', 'www4.bing.com'], + host: ['www.bing.com', 'cn.bing.com'], popup: function (text) { - popupCenter('https://www4.bing.com/translator', null, 800, screen.height); + popupCenter('https://cn.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'; + if (hasChineseByRange(text)) { + document.querySelector('#t_tl').value = 'en'; + } else { + document.querySelector('#t_tl').value = 'zh-CHS'; + } var source = document.querySelector('#t_sv'); source.value = text; tiggerEvent(source, 'input'); @@ -280,10 +271,50 @@ }, custom: function (text) {} }, + { + name: 'Google', + id: 'googleSearch', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAK5UlEQVR4Ae3cZXQbVxPG8QkzMzPT2xMoM3OgzMzMjOHEUBdDZQyjayozMzMzGAVJPO//ftBp3BqktbRaaW/O+c33q3mi3Z0dWdLxX/Huk9piV5yESzELC7EcT+EdfI8KhPEXvscneAPP4mFMx0nYBX3QEJJOTEl1TTAeZ+IefIDN0AQowRqcg2E2AMnRADsjGy8hAE2Sb7AYh6GTDUBiDcHN+ArqQZvxOmZiVzS2Aai/DjgTL0FTzDc4Dy1tAGK3A5YjBE1xv+EadLABqNtYrIemoRLMQw8bgP8aiIdQCU1zQSzAYPg+AN1xO8JQn9mER9HPjwFohptRDvW5YpzgpwCMxDvQKqyV6JzuATgTFdBqWT9j/3QMQCeshkbFWoBW6RKA3fEDNCbW59g2lQPQALPq9WhnbcL5qRiARrgPWi/WK+iZagFoihXQerEeQPNUuwS0RB7UMWszLkvFp4C2eA7qmFWM/VLxMbAzXoc6Zn2GEak4COqID6COWQXokIqj4EYohDpmZaNRqr4LyIA6YoVwUiq/Dj4W6oj1C7ZP5X2ACY63ca030SeVN4K64TtoGq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6cbiToB7yAXaBeMR+eHX06iNK97vtM/VEALICMyF1MSUqHPBpqMc8jcOT+I2wD16BRoxcO1n3XPBcsgPw9gk3aHNIXUyJCocbhiDUg37GDJceGwfharwPrd7eutO9Dyar+SXTbgkOgUTDlKhxuOugHrYZT+IG7B6nYVJjjMOFeBUarUmPTOcFTInbL3yOhETLlKhxqKZ4B5oiNuJVZOI0TMVOGImuaISG6ICBGI89cBJux8sIQJ363/Kz9ICc79268VsAiYUpMeFQ/fErNA1UwtBEGr36cN3njrcTHYB3Itf9WJgSMw61A0JQKzoj1u2vuy3ekKjmlx6UHRwGiZUpjpgtHqgVm+0euI2GVSAYP1mhoyFOmOIYB8qCWrEZv/RyPeiW3+M17VsEccoUx8xNFB6HWrEZu/IErf/QKPTioZnaAuKUKfXCYdrhI6gVi8jQ6HmnAXjy0Nu1NaQ+TKk3s8uHj6FWrMzQ6KFYm78+csdfX6bEBYfpjNegVswYGs2IbmiUFVx62gJtAokHU+KGg7RGEdRyNjQ6MOeH2q7590Z+1h0vpsRTZFq4HGo5HRq9U+1Wr6g2gMQVJe7MeBULoE7ZoVHuPyPejOAcSCKYkjAcZjrUGWvbB7OLzWoZJFFMSaTIssTPUCsmP2A/SCKZ4oauWAe1ovIQOkDSJQARZ6IcalXrV0yFuMUUtw3HG1CripXoCkn3ABhNMBMhqM/9iWMgyWBKMvXFYmyE+tB69IT4NQARQ/AQNkPT3CYsxSQIYAMQMRqroGmoDDkYAPEKU7xoAlYhDE1xP+EqdIB4jSle1gln4SVoivkAJ6EZxKtMSRWDcQM+9/CG8ZuYi93QAOJ1pqSibZGFVxCEJsmXWIjD0BmSakxJdU0xEWfjPnyUwF3/37EUp2EgJNWZko7aYXecgaswH0uwCs/gPfyAAMrwJV7GGizCDJyPI7AbRqMLGkDSyf8BDpOCJZsko8UAAAAASUVORK5CYII=', + host: ['www.google.com'], + popup: function (text) { + popupCenter('https://www.google.com/search?q=' + encodeURIComponent(text), null, 800, screen.height); + }, + custom: function (text) {} + }, + { + name: 'Bing', + id: 'bingSearch', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFUUlEQVR4AWL4//8/WZhhWkcBoL17gLElieIwnrVt27Y3Wtu2bdu2Hay98bNt27Z5X+6c/YJe1KJnXt2ZudXnn+T3/KZrbn3prh50YSLG4TMcavx5WmR5J/8sWAh9cDPWLfYLpwA+gf2PBfi8uGcFBfAdrJb64BadFfwGkFmIz3GYXnifAeisoAB0VlAA+WeF9XxOhgLILMQXPs8KCiDUF7f6PSsogPCscLDPiVIAmTLu8zpZCgAoY1OvE6YAgHN9T5wCuEiTBwUgCkAUgCgAUQCiAEQBiAIQBSAKQBSAKABRAKIARAGIAhAFUGgKgD/fFi3QGy1xrZMvKVcA/Nk6GAILLMb3OA0rF3cyFcDusBzT8HYxv79AAewAq4PBeATbKoDirAH6wuqoBm1wTfrfrq4AboFFWIzvcGqa6wUFsC4WwipgKt7GQQogjQCysX0Oq7BBeDiN9YICOBRWT2rQunrXCwogG18fWD1bhG9xSvWtFxTAzbAGNBVvVc96QQGsiwWwRjAID2EbBdA4AWRj/AzWiGrQCldjHQXQ8AEcAouX4npBAWTj7AWrMlPwJg5UAPUfwE2wKjawftcLCmAdLIBVuTJa4qr49YICCMf6KSwhi/ANTsZKCiA+gINhicrWCwcogJwAcsbbE5a4AXgQWyuAugdwIyxxEesFBbAO5sMKZiG+xnYKIH/MH8MKaiZ2UwD/P+aDYAX2lALIH3cPWEF9pwDyx3297wAUwNqY5zMABZCN/SPfASiAA/0GoACy8Xf3HYACOAFLYQlTAJERnFGgBaECiLgruA5dYYlTAJEx7If3MDv9ABRATAhr4Aq0Tz8ABRAbwx54AzPSD0ABxISwGi5CS9SkH4ACiIlhZ7yEKekHoABiQlgFN2KZswAUAMdfHQ9irqMzgALguCvgUox1tgZQABzzWHR3dhegADjWrvjN2W2gAuAYG+NdLIMlQAFU8J7/AcyBJUABVHCBdwnGwBKkACIm/xh0g6VGAcQv8H719/UA+oqgjfAOSrAEKYCIBd79mANLlwI4ezkWeBdjNKygvvISwDysXYexHo2usIK7z0sAL9VyjLvgF5gDnbGOhwA+xwq1WOC9jRKs4BbjCazm4fkAn2GFnAXefZgNc6ApdvbyhJBw8sMF3kUYDXNgEi709IygT/9n8o9GF5gDZbyLdf08JCqY/ODr8n6GOdEdB3l7TNwnWCE47oZ4CyWYA3NwG1Z09ZzAbPKDBd69mA1z4lts7vFJoR8Hk38hRsGcGI7j/T0rOJh8fj4KnWFOLMFTWM3rw6I/wgrYCT/BHGmOXTw/Lv4jbIQ3UYI5MRkXe98w4gvch1kwJ8p4D+t53zFkMkbDHOmJQ/ztGSRzcTtW8rdplHyPLfxtGycjcIK/jSNlCZ7B6v52DpUW2NXf3sEyBZf62zxayvgA6/vbPl564dDsdVEAfszDndk9vQLw5Qdsmb0WCsCPkTgpew28B/ABzImlePbv9/QK4GSYA62C/fgUALIIHsAyWAFNxWXh+6wAEESwF1oX7J7+o/x7egUQhnAxJsIS1huH5byvCiBng+bXErwszMPd2T29AogPYU+0giXgJ2yVjV0BVDaEi6r4sjAKp/zP+BVABTdlehWlKrqnfx5r5I9fARTtstAae2jS4wOIvSxMgDWgabgifvwKILXLQg0+xgaa6OoJINyRqyWsHvTBEZrgKg0gCOHCCl4W5uMerKzJTSCA4LLwSuRl4WdsHT8eBZDaZWE0TtVkJh5AEMIFtbgslPCC7umLFUB4WXgZJVigLfbUBBY0gCCE3fE9ZqALrtTEVc7vquRzBPZVAfAAAAAASUVORK5CYII=', + host: ['cn.bing.com', 'www.bing.com'], + popup: function (text) { + popupCenter('https://www.bing.com/search?q=' + encodeURIComponent(text), null, 800, screen.height); + }, + custom: function (text) {} + }, + { + name: '百度', + id: 'baiduSearch', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAL7ElEQVR4AezdBbCkuBYG4LPubsC663N3t3V3d3fCXR9/7u7u7u7+3szcJtxxn1l39728/1RR9hY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7Pd7B+vIEFqFsIHawDN8RES5FYhcrAFMBgCQO1ErGAIIBymQL6hjiFRIAcQBasg6ocuInUgBhAHuyHql24jWyAFkAynIOq3PUSeQAgg01+fcamnKOznAArgIUT9tRco6ccAyuIlRP2z16jolwC8ueJRb1HZDwHEhjerIuo9arscQFjPT7fVR5R3NQAzCx3qHhK7FkBjiLLxD9F+AAnwGqKMGuRKAMMgyrhPKGs7gBh4AlFW3EVsmwF0hyir2tsKICLuQJRVx2wFUB+inJDXRgDDIMoJo20EMBeinPAUEU0HcACinJHZdABPIMoZZUwGEAeinFLfZAAZIMopXUwGEMm53R4VYi4A4CZEOWOa6QC2QZQzRpoOYDJEOaO/6QD6QJQzWpkOoC5EOaO46QCyQ5QT3iGS2QCA8xDr1E5bByFDINapwbYCyAaxSn1GOjsBALsg1qhNtq+CS0KsUXXtBgCshRinTiO8CwHkwSeIUaq0S38De0GMUbNd+xwaGksgynN3kNitAIAYni9+q+fI7fJCSELsgKj/7j3K+WEjKDxGQhz0CU9wBSdxGx988vKr+20mrj4uGr6P349ZGIB6KImcSImYP5hoD404yIQSqInWCMFWBzaP9iCNX4ciw6AyNv3HEcV9mI0haIiiSIBQHgmNDKiHEGwxFMU7DEa4QBmLzoha6IZRWIUD2IoVmI2xGI7+6ISmqIE8iIlQjgiNNKiGQViGq5D/4Aw6I57/hiJVbJRCI3TBMIzBfGzEYVzFc7zGOWzAJAxAcYQy6QvdTCweWNuV8gAAAABJRU5ErkJggg==', + host: ['www.baidu.com'], + popup: function (text) { + popupCenter('https://www.baidu.com/s?wd=' + encodeURIComponent(text), null, 800, screen.height); + }, + custom: function (text) {} + }, + { + name: 'Wikipedia', + id: 'wikipediaSearch', + image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAQAAACTbf5ZAAAH9UlEQVR42u1baXBURRD+liQEUBMCiMp9yI0Ei0NESpBLtCCAAgGjgFUIhVBSXJYcApG7gCAChVgWICJQKMUZEAKIIqLggQdXlSBy38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oWsA6vyxms9FJOSxuVTTYBCC0NfqHwHebPIzJRDcCr2vee+GslewEAC8mxWxTCAHtYY2fCh9+0S058ilupLSylwZMQFuijKEFNsdTIOt1CGMqqfIVkMmqqhofDxRVRtWqh4qGqFXKX7g8xUhxMPa9VQznfQaVL+DhcyyH9+raWSh1blTCZsHKxw/bWv24NVpqNyjsIKyTamKpfo5Og1MgU1oSFHFHKq/QZgltERXBUoZKKsMNkhalLRSrDFSoJ4edwJcU164YilZK46VlhU8iRypi6yZPYPBlhiU6Mqa3EKnUDFieXdwlDj8Br1ntd6WzTSAuGCfyLzrp6MlI6hq/DpUh+Ixtfii/F5u6c9lmuxvsQxphIatxru1ZpnZcBuS2s5SxwROf8OxnoHJROcs501R9hjxhMx1I0CVqnK1Jsk0IGBgYGBgYGBgYGBgYGBgYGBjn4FzYbCWKR517JAAAAAElFTkSuQmCC', + host: ['en.wikipedia.org'], + popup: function (text) { + popupCenter('https://en.wikipedia.org/wiki/' + encodeURIComponent(text), null, 800, screen.height); + }, + custom: function (text) {} + }, { name: 'Settings', id: 'settings', - image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAp90lEQVR4AexcBXBbu9pcmZmCpcCFMrcptz/jY6bLzMzMzMzMzIzlNsxxqIYws/FI77t+zUzad6H2iV2PJzuzVY6sI0+0q0+YMqQoNpeUMCEE45yruBBqStWCGHmmlPIiKVElxsuMf0YU//g8TBwh9hGbAXCkGNhTr7+OVMLc2bNVAtBJkrQQwF+IK4gziWwC8X0piT7xGfTcE5ak5pGRkW8HBgYqyATFAPqRSiADpAx3VlWpdlRWTqfefwcxRBSTxPDnO3a8+sybb/6avseYQm2WWgbYXV09c0tp6ZUR0eLAT7Zte4RMsJGIVKGCgFTg4gULjJzzfCHEpYgTDHr90Xq9Pg9AGlIECqQIGGNmSZJWAtAjftCZzebZZDgrEalAFf2TKgawCmAh4gyNWp1PbWZGaiClDKAFYEGcQe2lJzIkHaYMoE7QkM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SvQq/HAfcLlQoXXjvF63bvJ8ICsznHoU++eOzS8DAU6C046GjmZRnXNORrECDNKLEuj5nuTDPusWjUkhbLMTJCm7g5imVvfjAyQoou7PnA2IEPRewyepSjht2rmpKi6XwXFIZUMj4oLujG08bf3oePNdoS4xlsDonF2thDGZ+xnr382ylwTkUdMnjf6EuKPC7yhkb6V2Z5rGu6fmU4qpFGIYcjkG9kqraZHzlAnsdGDtDCeVpopJyi4KczCwsLCwsLCwsLCwsLCwsLCwun6Mcs1lBLM+200cwO3mV0V8kzPcTGCGnXZl5xdF+yh9G3Uzl+55KIqXrpj3VY5rVUZ8J9UkjDRQd1VLCCYqo5EyJBFd210c/nvEHwGHOCXgWTRh5fB60MG3S1YtxNq1D7j6Kg288CyKbekOBNPfSTjQaLUwyLYtmNdUaD3ggtAhQKqdaY/SUpxvGsmtKLRqHkZIvraRTfqGjFGCN0qh3vF4GLQxXgI6Hj9EQ5iTopwOnlfQEa/GROuJjRC8M3cMSvXyB+Y5yUXn3sQrR7RYDXAx8mol8gnqPIhQBpItsXgQ9Xe5q+j0muJk6L1CwKVnlcgMnXKkAi+gWuvynwuflxpqcXQTedZfeFWwS9ivqr2AZfFgGe1BQI5TgOhBokEOrpfQFGGU35zhB4Mcz32h6Gpjmw7iVtnO4aea9jzDQqjwfHfBwOtOI1aHkcTpauNB+noz4SdWeDkRDJQQ0G8I9x4f880sNaDTUmi4/FupKiTxivfPBxnOe5zfg2nbGUBSVF1+u7rWpip7R4A5WspIQazoZEjVtctfF7BnkOg/klek8J+8gr4yKNky6fGj2IbCpCXgTik2B5gb4ToUj/CTMpYR9NtNPKCbbxNrmRuxX/B4UnbV8qW1T4AAAAAElFTkSuQmCC', host: ['example.com'], popup: function (text) { popupCenter('https://example.com', null, 800, screen.height); @@ -293,18 +324,37 @@ } } ], - hostCustomMap = {}, + hostCustomMap = {}, // {host: [method, ...]} customMadeIconArray = getCustomMadeIconArray(true); + // id、host 唯一性校验 + var idMaps = {}; + var hostMaps = {}; + customMadeIconArray.forEach(function (obj) { + if (obj.id in idMaps) { + alert('Duplicate Id: ' + obj.id); + } else { + idMaps[obj.id] = obj.id; + } + obj.host.forEach(function (host) { + if (host in hostMaps) { + log('Duplicate Host: ' + host); + } else { + hostMaps[host] = host; + } + }); + }); + log('idMaps:', idMaps, 'hostMaps:', hostMaps); // 初始化 hostCustomMap customMadeIconArray.forEach(function (obj) { obj.host.forEach(function (host) { // 赋值DOM加载后的自定义方法Map - hostCustomMap[host] = obj.custom; + if (host in hostCustomMap) { + hostCustomMap[host].push(obj.custom); + } else { + hostCustomMap[host] = [obj.custom]; + } }); }); - // 前进后退按钮 - var backAndForward = dataTransfer.getBackAndForward(); - // 绑定前进后退按钮拖动事件 - var backAndForwardDrag = new Drag(backAndForward); + log('hostCustomMap:', hostCustomMap); // 翻译图标 var icon = document.createElement('tr-icon'); // 绑定图标拖动事件 @@ -347,7 +397,6 @@ shadow.appendChild(style); // 内部样式表 shadow.appendChild(link); // 外部样式表 shadow.appendChild(icon); // 翻译图标加入 Shadow - shadow.appendChild(backAndForward); // 前进后退按钮加入 Shadow // 重定向 var redirect_url = gm.get(gm.REDIRECT_URL, ''); log('redirect_url:' + redirect_url); @@ -366,10 +415,6 @@ if (text && window.location.host in hostCustomMap) { dataTransfer.beforeCustom(hostCustomMap[window.location.host]); } - if (window.location.host in hostCustomMap) { - document.onkeydown = escExit; - backAndForward.style.display = 'block'; // add back and forward button - } // 鼠标事件:防止选中的文本消失 document.addEventListener('mousedown', function (e) { if (e.target == icon || (e.target.parentNode && e.target.parentNode == icon)) { // 点击了翻译图标 @@ -396,8 +441,8 @@ if (text && icon.style.display == 'none') { log('show icon'); log(text + ' | ' + e.pageX + ' | ' + e.pageY); - icon.style.top = e.pageY + 12 + 'px'; - icon.style.left = e.pageX + 12 + 'px'; + icon.style.top = e.pageY + 10 + 'px'; + icon.style.left = e.pageX + 10 + 'px'; icon.style.display = 'block'; // 图标开关初始化 var isMore = gm.get(gm.MORE, false); @@ -462,19 +507,6 @@ } return ''; } - /**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+ @@ -517,6 +549,10 @@ shadow.appendChild(a); a.click(); } + /**是否包含汉字*/ + function hasChineseByRange(str) { + return /[\u4e00-\u9fa5]/ig.test(str); + } /**鼠标拖动*/ function Drag(element) { this.dragging = false; @@ -567,10 +603,6 @@ iconDrag.dragging = false; iconDrag.unsetMouseMove(); } - if (backAndForwardDrag) { - backAndForwardDrag.dragging = false; - backAndForwardDrag.unsetMouseMove(); - } } /**设置*/ function settings() { @@ -662,6 +694,7 @@ item.appendChild(span.cloneNode(true)); item.appendChild(name); document.body.appendChild(item); + document.body.appendChild(document.createElement('hr')); }); } /**得到定制化的图标顺序*/ diff --git a/translate/translate.png b/translate/translate.png new file mode 100644 index 0000000..f1c6ef2 Binary files /dev/null and b/translate/translate.png differ