MCPcopy Create free account
hub / github.com/XIU2/UserScript / addStyle

Function addStyle

GoogleTranslate-Beautification.user.js:59–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57
58 // 添加样式
59 function addStyle() {
60 var style,
61 style_1 = `
62/* 翻译结果的选择列表宽度
63.alt-menu {
64 max-width: 35% !important;
65} */
66/* 翻译结果选择时显示翻译结果的翻译结果
67.goog-menu.round-trip-content {
68 white-space: normal !important;
69 word-break: break-all !important;
70} */`,
71 style_2 = `
72/* 清理多余内容
73.rQKk7.zJmlgc {
74 display: none !important;
75} */`,
76 style_Add = document.createElement('style');
77 if (menu_streamline) {
78 style = style_1 + style_2;
79 }else{
80 style = style_1;
81 }
82 style_Add.innerHTML = style;
83 document.head.appendChild(style_Add);
84 }
85})();

Calls

no outgoing calls

Tested by

no test coverage detected