Skip to content

Commit 13c9c10

Browse files
committed
新增 Google 翻译美化
1 parent e1ba022 commit 13c9c10

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// ==UserScript==
2+
// @name Google 翻译美化
3+
// @version 1.0.0
4+
// @author X.I.U
5+
// @description 精简多余内容、修复翻译结果溢出屏幕问题
6+
// @icon https://translate.google.cn/favicon.ico
7+
// @match *://translate.google.cn/*
8+
// @match *://translate.google.com/*
9+
// @license GPL-3.0 License
10+
// @run-at document-start
11+
// @namespace https://greasyfork.org/scripts/413721
12+
// ==/UserScript==
13+
14+
(function() {
15+
var style_Add = document.createElement('style');
16+
style_Add.innerHTML = `
17+
/* 清理多余内容 */
18+
.input-button-container,.ft-icon-row,.frame:before,.app-download-bar,#gb,.gp-footer,.feedback-link,#gt-input-tool {
19+
display: none !important;
20+
}
21+
/* 翻译结果的选择列表宽度 */
22+
.alt-menu {
23+
max-width: 35% !important;
24+
}
25+
/* 翻译结果选择时显示翻译结果的翻译结果 */
26+
.goog-menu.round-trip-content {
27+
white-space: normal !important;
28+
word-break: break-all !important;
29+
}
30+
/* 主体顶部留白 */
31+
.homepage-content-wrap {
32+
margin-top: 26px;
33+
}
34+
/* 部分元素的边框调整 */
35+
.gt-lc.gt-lc-mobile .gt-cd,.gt-lc.gt-lc-mobile.show-as-one-card {
36+
border: .6px solid #eeeeee !important;
37+
border-radius: 2px !important;
38+
}
39+
.main-header {
40+
border: 1px solid #eee !important;
41+
box-shadow: none !important;
42+
}
43+
.ls-wrap {
44+
border-top: none !important;
45+
border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
46+
}
47+
.results-container.empty {
48+
border-left: 1px solid rgba(0, 0, 0, 0.06) !important;
49+
}`;
50+
document.head.appendChild(style_Add);
51+
})();

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
| **3DM论坛增强** | 自动回复、自动无缝翻页、清理置顶帖子 | **[「安装」](https://greasyfork.org/scripts/412890)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/3dm-Enhanced.user.js)** |
2424
| **智友邦论坛美化** | 精简多余内容、宽屏显示 | **[「安装」](https://greasyfork.org/scripts/412361)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhiyoo-Beautification.user.js)** |
2525
| **智友邦论坛增强** | 自动签到、自动回复、自动无缝翻页、清理置顶帖子等 | **[「安装」](https://greasyfork.org/scripts/412362)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhiyoo-Enhanced.user.js)** |
26+
| **Google 翻译美化** | 精简多余内容、修复翻译结果溢出屏幕问题 | **[「安装」](https://greasyfork.org/scripts/413721)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/GoogleTranslate-Beautification.user.js)** |
2627
| **吾爱破解论坛美化** | 精简多余内容 | **[「安装」](https://greasyfork.org/scripts/412681)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Beautification.user.js)** |
2728
| **吾爱破解论坛增强** | 自动签到、自动无缝翻页 | **[「安装」](https://greasyfork.org/scripts/412680)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Enhanced.user.js)** |
2829
| **Steam 创意工坊大图修复** | 修复 Steam 创意工坊预览大图无法显示的问题 | **[「安装」](https://greasyfork.org/scripts/397666)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/SteamWorkshopImageRepair.user.js)** |

0 commit comments

Comments
 (0)