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+ } ) ( ) ;
0 commit comments