Skip to content

Commit 7d86962

Browse files
committed
优化 脚本菜单图标
1 parent adf81f5 commit 7d86962

11 files changed

Lines changed: 93 additions & 49 deletions

3dm-Enhanced.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
}
4242
for (let i=0;i<menu_ALL.length;i++){ // 循环注册脚本菜单
4343
menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]);
44-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
44+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
4545
}
46-
menu_ID[menu_ID.length] = GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412890/feedback', {active: true,insert: true,setParent: true});});
46+
menu_ID[menu_ID.length] = GM_registerMenuCommand('💬 反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412890/feedback', {active: true,insert: true,setParent: true});});
4747
}
4848

4949
// 菜单开关

52pojie-Beautification.user.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 吾爱破解论坛美化
3-
// @version 1.0.8
3+
// @version 1.0.0
44
// @author X.I.U
55
// @description 精简多余内容、样式优化
66
// @match *://www.52pojie.cn/*
@@ -38,9 +38,9 @@
3838
}
3939
for (let i=0;i<menu_ALL.length;i++){ // 循环注册脚本菜单
4040
menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]);
41-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
41+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
4242
}
43-
menu_ID[menu_ID.length] = GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412681/feedback', {active: true,insert: true,setParent: true});});
43+
menu_ID[menu_ID.length] = GM_registerMenuCommand('💬 反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412681/feedback', {active: true,insert: true,setParent: true});});
4444
}
4545

4646
// 菜单开关
@@ -81,8 +81,6 @@ a[href="connect.php?mod=config"], #toptb, #navmenu, #nv_ph, #nv, #pt .y, #chart,
8181
margin:0 0 2px;
8282
}
8383
.pls .avatar img {
84-
width:100px;
85-
height:100px;
8684
background:none;
8785
padding:0;
8886
border:4px solid #ffffff
@@ -91,9 +89,6 @@ a[href="connect.php?mod=config"], #toptb, #navmenu, #nv_ph, #nv, #pt .y, #chart,
9189
width:60px;
9290
}
9391
}
94-
.pls .avatar {
95-
text-align:center;
96-
}
9792
.t_fsz {
9893
min-height:60px;
9994
}
@@ -144,14 +139,26 @@ textarea#fastpostmessage {
144139
border-bottom:0;
145140
background:0;
146141
}
142+
143+
.pls .o li {
144+
margin: 0 !important;;
145+
height: 20px !important;;
146+
line-height: 20px !important;;
147+
}
148+
149+
/* 左侧层主信息 */
150+
.pls .avatar img {width: auto !important;max-height: 100px !important;}
151+
.pls .avatar {text-align:center !important; margin: 0 !important;}
152+
.pls .tns {padding: 0 !important;}
153+
147154
/* 链接点击后颜色变浅(灰白色) */
148155
.tl th a:visited, .tl td.fn a:visited {
149156
color: #aaa;
150-
}`,
151-
style_Add = document.createElement('style');
157+
}`;
158+
//style_Add = document.createElement('style');
152159
style = style_2
153160
if (menu_value('menu_rule')) style += style_1;
154-
style_Add.innerHTML = style;
161+
/*style_Add.innerHTML = style;
155162
if (document.head) {
156163
document.head.appendChild(style_Add);
157164
} else {
@@ -161,6 +168,7 @@ textarea#fastpostmessage {
161168
clearInterval(timer);
162169
}
163170
}, 1);
164-
}
171+
}*/
172+
document.lastChild.appendChild(document.createElement("style")).textContent = style;
165173
}
166174
})();

52pojie-Enhanced.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
}
4242
for (let i=0;i<menu_ALL.length;i++) { // 循环注册脚本菜单
4343
menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]);
44-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
44+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
4545
}
46-
menu_ID[menu_ID.length] = GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412680/feedback', {active: true,insert: true,setParent: true});});
46+
menu_ID[menu_ID.length] = GM_registerMenuCommand('💬 反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412680/feedback', {active: true,insert: true,setParent: true});});
4747
}
4848

4949
// 菜单开关

Autopage.user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
'use strict';
4040
(function() {
4141
// 注册脚本菜单
42-
GM_registerMenuCommand('反馈 & 欢迎申请支持', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});});
42+
GM_registerMenuCommand('💬 反馈 & 欢迎申请支持', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});});
4343

4444
// 默认 ID 为 0
4545
var curSite = {SiteTypeID: 0};

GithubEnhanced-High-Speed-Download.user.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
if (menu_raw_fast > raw_url.length - 1) { // 避免在减少 raw 数组后,用户储存的数据大于数组而报错
9292
menu_raw_fast = 0
9393
}
94-
menu_menu_raw_fast_ID = GM_registerMenuCommand(`🔄 [ ${raw_url[menu_raw_fast][1]} ] 加速源 (☁) - 点击切换`, menu_toggle_raw_fast);
94+
menu_menu_raw_fast_ID = GM_registerMenuCommand(`${menu_num(menu_raw_fast)} [ ${raw_url[menu_raw_fast][1]} ] 加速源 (☁) - 点击切换`, menu_toggle_raw_fast);
9595
menu_feedBack_ID = GM_registerMenuCommand('💬 反馈 & 建议 [Github]', function () {window.GM_openInTab('https://github.com/XIU2/UserScript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412245/feedback', {active: true,insert: true,setParent: true});});
9696
}
9797

@@ -109,6 +109,32 @@
109109
registerMenuCommand(); // 重新注册脚本菜单
110110
};
111111

112+
function menu_num(num) {
113+
switch(num) {
114+
case 0:
115+
return '0️⃣'
116+
break;
117+
case 1:
118+
return '1️⃣'
119+
break;
120+
case 2:
121+
return '2️⃣'
122+
break;
123+
case 3:
124+
return '3️⃣'
125+
break;
126+
case 4:
127+
return '4️⃣'
128+
break;
129+
case 5:
130+
return '5️⃣'
131+
break;
132+
case 6:
133+
return '6️⃣'
134+
break;
135+
}
136+
}
137+
112138
addRelease(); // Release 加速
113139
addDownloadZIP(); // Download ZIP 加速
114140
addGitClone(); // Git Clone 加速

Hostloc-Enhanced.user.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@
5353
for (let i=0;i<menu_ALL.length;i++){ // 循环注册脚本菜单
5454
menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]);
5555
if (menu_ALL[i][0] === 'menu_reAutoSignIn') {
56-
menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){reAutoSignIn()});
56+
menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){reAutoSignIn()});
5757
} else if (menu_ALL[i][0] === 'menu_customBlockUsers') {
58-
menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customBlockUsers()});
58+
menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customBlockUsers()});
5959
} else if (menu_ALL[i][0] === 'menu_customBlockKeywords') {
60-
menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customBlockKeywords()});
60+
menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customBlockKeywords()});
6161
} else if (menu_ALL[i][0] === 'menu_customLittleTail') {
62-
menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customLittleTail()});
62+
menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customLittleTail()});
6363
} else {
64-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
64+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
6565
}
6666
}
67-
menu_ID[menu_ID.length] = GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/414005/feedback', {active: true,insert: true,setParent: true});});
67+
menu_ID[menu_ID.length] = GM_registerMenuCommand('💬 反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/414005/feedback', {active: true,insert: true,setParent: true});});
6868
}
6969

7070
// 菜单开关

Lanzou-Enhanced.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
for (let i=0;i<menu_ALL.length;i++){ // 循环注册脚本菜单
5656
menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]);
5757
if (menu_ALL[i][0] == 'menu_refreshCorrection') {
58-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){if(menu_value('menu_refreshCorrection')){UNrefreshCorrection();}else{refreshCorrection();};menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
58+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){if(menu_value('menu_refreshCorrection')){UNrefreshCorrection();}else{refreshCorrection();};menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
5959
}else{
60-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
60+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
6161
}
6262
}
63-
menu_ID[menu_ID.length] = GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419224/feedback', {active: true,insert: true,setParent: true});});
63+
menu_ID[menu_ID.length] = GM_registerMenuCommand('💬 反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419224/feedback', {active: true,insert: true,setParent: true});});
6464
}
6565

6666
// 菜单开关

V2ex-Enhanced.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
}
4747
for (let i=0;i<menu_ALL.length;i++){ // 循环注册脚本菜单
4848
menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]);
49-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
49+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
5050
}
51-
menu_ID[menu_ID.length] = GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/424246/feedback', {active: true,insert: true,setParent: true});});
51+
menu_ID[menu_ID.length] = GM_registerMenuCommand('💬 反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/424246/feedback', {active: true,insert: true,setParent: true});});
5252
}
5353

5454
// 菜单开关

Zhihu-Beautification.user.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
menu_ALL[i][3] = 1;
5050
GM_setValue('menu_darkModeType', menu_ALL[i][3]);
5151
}
52-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]} ] ${menu_ALL[i][1]}`, function(){menu_toggle(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`)});
52+
menu_ID[i] = GM_registerMenuCommand(`${menu_num(menu_ALL[i][3])} ${menu_ALL[i][1]}`, function(){menu_toggle(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`)});
5353
} else {
54-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
54+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
5555
}
5656
}
57-
menu_ID[menu_ID.length] = GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412212/feedback', {active: true,insert: true,setParent: true});});
57+
menu_ID[menu_ID.length] = GM_registerMenuCommand('💬 反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/412212/feedback', {active: true,insert: true,setParent: true});});
5858
}
5959

6060
// 切换暗黑模式
@@ -79,6 +79,23 @@
7979
}
8080
};
8181

82+
function menu_num(num) {
83+
switch(num) {
84+
case 1:
85+
return '1️⃣'
86+
break;
87+
case 2:
88+
return '2️⃣'
89+
break;
90+
case 3:
91+
return '3️⃣'
92+
break;
93+
case 4:
94+
return '4️⃣'
95+
break;
96+
}
97+
}
98+
8299
// 菜单开关
83100
function menu_switch(menu_status, Name, Tips) {
84101
if (menu_status == 'true'){

Zhihu-Enhanced.user.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ function registerMenuCommand() {
4949
for (let i=0;i<menu_ALL.length;i++){ // 循环注册脚本菜单
5050
menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]);
5151
if (menu_ALL[i][0] === 'menu_customBlockUsers') {
52-
menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customBlockUsers()});
52+
menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customBlockUsers()});
5353
} else if (menu_ALL[i][0] === 'menu_customBlockKeywords') {
54-
menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customBlockKeywords()});
54+
menu_ID[i] = GM_registerMenuCommand(`#️⃣ ${menu_ALL[i][1]}`, function(){customBlockKeywords()});
5555
} else {
56-
menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
56+
menu_ID[i] = GM_registerMenuCommand(`${menu_ALL[i][3]?'':'❎'} ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)});
5757
}
5858
}
59-
menu_ID[menu_ID.length] = GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419081/feedback', {active: true,insert: true,setParent: true});});
59+
menu_ID[menu_ID.length] = GM_registerMenuCommand('💬 反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419081/feedback', {active: true,insert: true,setParent: true});});
6060
}
6161

6262

0 commit comments

Comments
 (0)