diff --git a/translate/translate-dictionary.js b/translate/translate-dictionary.js index 2bb18b7..2e27d59 100644 --- a/translate/translate-dictionary.js +++ b/translate/translate-dictionary.js @@ -1,13 +1,13 @@ // ==UserScript== // @name 划词翻译:多词典查询 // @namespace http://tampermonkey.net/ -// @version 3.5 +// @version 3.6 // @description 划词翻译调用“有道词典(有道翻译)、金山词霸、Bing 词典(必应词典)、剑桥高阶、沪江小D、谷歌翻译” // @author https://github.com/barrer // @match http://*/* // @include https://*/* // @include file:///* -// @run-at document-end +// @run-at document-start // @connect youdao.com // @connect iciba.com // @connect translate.google.cn @@ -26,6 +26,7 @@ var style = document.createElement('style'); style.textContent = ` /*组件样式*/ + :host{all:initial!important} *{word-wrap:break-word!important;word-break:break-word!important} a{color:#36f;text-decoration:none;cursor:pointer} a:hover{text-decoration:underline} diff --git a/translate/translate-dictionary.png b/translate/translate-dictionary.png index e524e2c..5d3cf87 100644 Binary files a/translate/translate-dictionary.png and b/translate/translate-dictionary.png differ diff --git a/translate/translate.js b/translate/translate.js index a5742f3..b0cc0ec 100644 --- a/translate/translate.js +++ b/translate/translate.js @@ -1,13 +1,13 @@ // ==UserScript== // @name Translate // @namespace http://tampermonkey.net/ -// @version 4.9 +// @version 5.0 // @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://*/* // @include file:///* -// @run-at document-end +// @run-at document-start // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue @@ -20,6 +20,7 @@ /**样式*/ var style = document.createElement('style'); style.textContent = ` + :host{all:initial!important} *{word-wrap:break-word!important} img{cursor:pointer;display:inline-block;width:16px;height:16px;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} diff --git a/translate/translate.png b/translate/translate.png index c4b7efb..da09841 100644 Binary files a/translate/translate.png and b/translate/translate.png differ