样式微调
This commit is contained in:
parent
4958d62e6e
commit
db416430aa
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name 划词翻译:多词典查询
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 3.4
|
||||
// @version 3.5
|
||||
// @description 划词翻译调用“有道词典(有道翻译)、金山词霸、Bing 词典(必应词典)、剑桥高阶、沪江小D、谷歌翻译”
|
||||
// @author https://github.com/barrer
|
||||
// @match http://*/*
|
||||
|
@ -29,17 +29,17 @@
|
|||
*{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;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: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}
|
||||
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:hover{border:1px solid #c6c6c6}
|
||||
img[activate]{border:1px solid #f90}
|
||||
img[activate]:hover{border:1px solid #f90;-webkit-box-shadow:unset;box-shadow:unset}
|
||||
img[activate]:hover{border:1px solid #f90}
|
||||
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}
|
||||
tr-content{display:block;max-width:300px;max-height:200px;width:300px;height:200px;overflow-x:auto;overflow-y:scroll;background:white;padding:2px 8px;margin-top:5px;box-sizing:content-box;font-family:"Helvetica Neue","Helvetica","Arial","sans-serif";font-size:14px;line-height:18px}
|
||||
tr-content{display:block;max-width:300px;max-height:200px;width:300px;height:200px;overflow-x:auto;overflow-y:scroll;background:white;padding:2px 8px;margin-top:5px;box-sizing:content-box;font-family:"Helvetica Neue","Helvetica","Arial","sans-serif";font-size:13px;line-height:normal}
|
||||
.list-title~.list-title{margin-top:1em}
|
||||
.list-title{color:#00c;display:inline-block}
|
||||
.list-title:hover{text-decoration:none}
|
||||
|
@ -288,7 +288,7 @@
|
|||
var iconArray = [{
|
||||
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/38K7ARvIb7j3QbzfwvMAd7AwS3rUiPBG8KiIuCLMWboRwkQJIOIxhEdI8DBGrxli0cJ+IJty9j6MQJSYKxNGhwhwJNFdNOGOIcjBKRA9pTuGjDpC0iBNrHP0kBfgKcBc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Arob9NkcW/9d3vhxhL0IFTII/lds/yZW2nGdTPca6etvEcZDhaAd6Mukkkocv0splYYk2aTVWJlXkSgC6kaqTS6VdiEF+Pvk1Ern+xEmx/8B/uTnd+kxPtUAAAAASUVORK5CYII=',
|
||||
trigger: function (text, time) {
|
||||
idsType = idsExtension.LIST_DICT;
|
||||
if (text != text.toLowerCase()) {
|
||||
|
@ -301,7 +301,7 @@
|
|||
}, {
|
||||
name: '谷歌翻译',
|
||||
id: 'icon-google',
|
||||
image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAwFBMVEX////x+Pu83vl9vvRQq/Q0nvQsm/STyfXY6/pktfYjmfUhlvOr1Pb2+/0+pPT6/P3K4/f8/f0ak/Px8/Xz9vf2+Pn5+vrk6ezt8PLs7/H//vr18/ETkPP6/Pr59fL9+/rq7fDf7/wJi/PE2/DM09edqK6psrfZ4OZzg4s6UFtHXGb9+fS/x8xic3oPkvuQnaSCkZixu8Egm/wjjuEyaZItRVAwhNN2rOBQltkgfNQnlOw2l+UfjeoKgeZCmugYddL/Jsx8AAAAAXRSTlMAQObYZgAABd1JREFUeAHs01uyoyAQxvEoN6HVo2AINhqSzGX/S5zXmTpUBTN2+eJ/A/yqv+JydnZ2dnZ2dpatqhkX8k1CVReiGi0NvE+0F5K6tjdQktE0J2gFFNY3JPfvoTRJsUGlDZRmdLc/oJZQEOEGDAqi3IDDlvTX7gABWxL7byBhS0YdDABeHQwQw3gsANTlYADvDgbI+mssiwhglZtcQdPVjyQA4LcwFxWmESkA0MYwl+X8SACwrBgwB48EgP4W59LcSACQ+Q3yTePuAFiYKz9BWP8DYG0ewIctJ/gYYI1WHDIGC+29HOA+B7BqbPjyXWAXNm/Y4FOAFQ3iqGDJbNAP90AP0FVKWPc5gGmjIwdAu64enbbZDR6RHCCeyXtEZTInePVDDMQAy3zyq8cht4E1KsYHMaBOPqHHrmQDAsDCnyldm2vCVtrcBj/ugRbA1oQ1C4gNz/0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9ZHmMbxkhGAuMkn4VG58G+HWj+2TOQ7H8K/kgRog+fmpaHDQMDhYpHH/JbHPgnQBl+syxpzefjTY6yilnoz/pvwdUAAoldoTtTDM1L+/GhVJrOcKROiscMp58RxLJxunOvb+vf8P4SrYCFqyvrgAAAAAElFTkSuQmCC',
|
||||
trigger: function (text, time) {
|
||||
idsType = idsExtension.LIST_GOOGLE;
|
||||
idsType.forEach(function (id) {
|
||||
|
@ -606,8 +606,8 @@
|
|||
}
|
||||
/**显示内容面板*/
|
||||
function displayContent() {
|
||||
var panelHeight = 237 + 8; // icon 展开后总高度
|
||||
var panelWidth = 316 + 8; // icon 展开后总宽度
|
||||
var panelHeight = 231 + 8; // icon 展开后总高度
|
||||
// 计算位置
|
||||
log('content position:',
|
||||
'window.scrollY', window.scrollY,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name Translate
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 4.8
|
||||
// @version 4.9
|
||||
// @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://*/*
|
||||
|
@ -21,13 +21,11 @@
|
|||
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;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: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}
|
||||
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:hover{border:1px solid #c6c6c6}
|
||||
img[is-more]{display:none}
|
||||
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');
|
||||
|
@ -37,13 +35,11 @@
|
|||
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);
|
||||
},
|
||||
|
@ -120,12 +116,10 @@
|
|||
host: ['more.example.com'],
|
||||
popup: function (text) {
|
||||
icon.querySelectorAll('img[is-more]').forEach(function (ele) {
|
||||
if (ele.style.display == 'none') {
|
||||
ele.style.display = 'inline-block';
|
||||
gm.set(gm.MORE, true);
|
||||
} else {
|
||||
if (ele.style.display == 'inline-block') {
|
||||
ele.style.display = 'none';
|
||||
gm.set(gm.MORE, false);
|
||||
} else {
|
||||
ele.style.display = 'inline-block';
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -444,16 +438,6 @@
|
|||
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);
|
||||
log('isMore: ' + isMore);
|
||||
icon.querySelectorAll('img[is-more]').forEach(function (ele) {
|
||||
if (isMore) {
|
||||
ele.style.display = 'inline-block';
|
||||
} else {
|
||||
ele.style.display = 'none';
|
||||
}
|
||||
});
|
||||
// 兼容部分 Content Security Policy
|
||||
icon.style.position = 'absolute';
|
||||
icon.style.zIndex = '2147473647';
|
||||
|
|
Loading…
Reference in New Issue
Block a user