-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df56f48
commit 87f08c0
Showing
9 changed files
with
327 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/groups/commons/checkuser/MediaWiki:Group-checkuser.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.checkuser-show { | ||
display: revert !important; | ||
} | ||
|
||
div.vectorMenu li.checkuser-show { | ||
order: 1000; | ||
} | ||
|
||
.vectorMenu .checkuser-show::before { | ||
content: " "; | ||
display: block; | ||
height: 1px; | ||
color: #A2A9B1; | ||
background-color: #A2A9B1; | ||
border: 0; | ||
margin: 7px; | ||
} | ||
|
||
.vectorMenu .checkuser-show ~ .checkuser-show::before { | ||
display: none; | ||
} | ||
|
||
.vectorMenu .checkuser-show { | ||
cursor: default; | ||
} | ||
|
||
.vectorMenu .checkuser-show ~ .checkuser-show, | ||
.vectorMenu .checkuser-show a { | ||
cursor: pointer; | ||
} |
30 changes: 30 additions & 0 deletions
30
src/groups/commons/interface-admin/MediaWiki:Group-interface-admin.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.interface-admin-show { | ||
display: revert !important; | ||
} | ||
|
||
div.vectorMenu li.interface-admin-show { | ||
order: 997; | ||
} | ||
|
||
.vectorMenu .interface-admin-show::before { | ||
content: " "; | ||
display: block; | ||
height: 1px; | ||
color: #A2A9B1; | ||
background-color: #A2A9B1; | ||
border: 0; | ||
margin: 7px; | ||
} | ||
|
||
.vectorMenu .interface-admin-show ~ .interface-admin-show::before { | ||
display: none; | ||
} | ||
|
||
.vectorMenu .interface-admin-show { | ||
cursor: default; | ||
} | ||
|
||
.vectorMenu .interface-admin-show ~ .interface-admin-show, | ||
.vectorMenu .interface-admin-show a { | ||
cursor: pointer; | ||
} |
30 changes: 30 additions & 0 deletions
30
src/groups/commons/patroller/MediaWiki:Group-patroller.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.patroller-show { | ||
display: revert !important; | ||
} | ||
|
||
div.vectorMenu li.patroller-show { | ||
order: 998; | ||
} | ||
|
||
.vectorMenu .patroller-show::before { | ||
content: " "; | ||
display: block; | ||
height: 1px; | ||
color: #A2A9B1; | ||
background-color: #A2A9B1; | ||
border: 0; | ||
margin: 7px; | ||
} | ||
|
||
.vectorMenu .patroller-show ~ .patroller-show::before { | ||
display: none; | ||
} | ||
|
||
.vectorMenu .patroller-show { | ||
cursor: default; | ||
} | ||
|
||
.vectorMenu .patroller-show ~ .patroller-show, | ||
.vectorMenu .patroller-show a { | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.patroller-show, | ||
.sysop-show { | ||
display: revert !important; | ||
} | ||
|
||
div.vectorMenu li.patroller-show { | ||
order: 998; | ||
} | ||
|
||
div.vectorMenu li.sysop-show { | ||
order: 999; | ||
} | ||
|
||
.vectorMenu .patroller-show::before, | ||
.vectorMenu .sysop-show::before { | ||
content: " "; | ||
display: block; | ||
height: 1px; | ||
color: #A2A9B1; | ||
background-color: #A2A9B1; | ||
border: 0; | ||
margin: 7px; | ||
} | ||
|
||
.vectorMenu .patroller-show ~ .patroller-show::before, | ||
.vectorMenu .sysop-show ~ .sysop-show::before { | ||
display: none; | ||
} | ||
|
||
.vectorMenu .patroller-show, | ||
.vectorMenu .sysop-show { | ||
cursor: default; | ||
} | ||
|
||
.vectorMenu .patroller-show ~ .patroller-show, | ||
.vectorMenu .patroller-show a, | ||
.vectorMenu .sysop-show ~ .sysop-show, | ||
.vectorMenu .sysop-show a { | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"use strict"; | ||
$(() => { | ||
// 自授权管理员增加更短的时间选项 | ||
if (mw.config.get("wgCanonicalSpecialPageName") === "Userrights") { | ||
const wpExpiry = document.querySelector("#mw-input-wpExpiry-sysop"); | ||
Array.from(wpExpiry.options).filter((ele) => ele.value === "1 day")[0].before(new Option("30分钟", "30 minutes"), new Option("2小时", "2 hours"), new Option("6小时", "6 hours")); | ||
} | ||
//替换文本默认不勾选「通过Special:最近更改和监视列表通知这些编辑」 | ||
if (mw.config.get("wgCanonicalSpecialPageName") === "ReplaceText" && $("#doAnnounce")[0]) { | ||
$("#doAnnounce, #mw-search-ns0").prop("checked", false); | ||
$("#mw-search-ns6").prop("checked", true); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.suppress-show { | ||
display: revert !important; | ||
} | ||
|
||
div.vectorMenu li.suppress-show { | ||
order: 1001; | ||
} | ||
|
||
.vectorMenu .suppress-show::before { | ||
content: " "; | ||
display: block; | ||
height: 1px; | ||
color: #A2A9B1; | ||
background-color: #A2A9B1; | ||
border: 0; | ||
margin: 7px; | ||
} | ||
|
||
.vectorMenu .suppress-show ~ .suppress-show::before { | ||
display: none; | ||
} | ||
|
||
.vectorMenu .suppress-show { | ||
cursor: default; | ||
} | ||
|
||
.vectorMenu .suppress-show ~ .suppress-show, | ||
.vectorMenu .suppress-show a { | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// <pre> | ||
"use strict"; | ||
(async () => { | ||
/* 函数定义块 */ | ||
const isNewVersion = +mw.config.get("wgVersion").slice(0, 4) >= 1.35; | ||
//添加监督原因链接 | ||
function addLink($obj, act) { | ||
const href = $obj.css("margin-left", "1em")[0].href, | ||
reasonPageName = href.slice(href.indexOf("title=") + 6, href.indexOf("&action")); | ||
$obj.before(`<a target="_blank" href="/${reasonPageName}">浏览${act}原因</a>`); | ||
} | ||
//滥用日志 | ||
function hideAbuselogLink() { | ||
const reasonpage = isNewVersion ? "MediaWiki:Revdelete-reason-dropdown-suppress" : "MediaWiki:Revdelete-reason-dropdown"; | ||
const link = $("<div/>", { | ||
id: "hideAbuselogLink", | ||
"class": "mw-revdel-editreasons", | ||
css: { | ||
"font-size": "90%", | ||
"text-align": "right", | ||
}, | ||
}).append(`<a target="_blank" href="/index.php?title=${reasonpage}&action=edit">编辑隐藏原因</a>`); | ||
$("form[action='/Special:%E6%BB%A5%E7%94%A8%E6%97%A5%E5%BF%97']").append(link); | ||
} | ||
/* 函数执行块 */ | ||
await $.ready; | ||
//隐藏滥用日志原因浏览链接(预留其他接口) | ||
if (mw.config.get("wgCanonicalSpecialPageName") === "AbuseLog" && window.location.href.includes("&hide=")) { | ||
hideAbuselogLink(); | ||
addLink($(".mw-revdel-editreasons > a"), "隐藏"); | ||
} | ||
})(); | ||
// </pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
.patroller-show, | ||
.sysop-show { | ||
display: revert !important; | ||
} | ||
|
||
div.vectorMenu li.patroller-show { | ||
order: 998; | ||
} | ||
|
||
div.vectorMenu li.sysop-show { | ||
order: 999; | ||
} | ||
|
||
.vectorMenu .patroller-show::before, | ||
.vectorMenu .sysop-show::before { | ||
content: " "; | ||
display: block; | ||
height: 1px; | ||
color: #A2A9B1; | ||
background-color: #A2A9B1; | ||
border: 0; | ||
margin: 7px; | ||
} | ||
|
||
.vectorMenu .patroller-show ~ .patroller-show::before, | ||
.vectorMenu .sysop-show ~ .sysop-show::before { | ||
display: none; | ||
} | ||
|
||
.vectorMenu .patroller-show, | ||
.vectorMenu .sysop-show { | ||
cursor: default; | ||
} | ||
|
||
.vectorMenu .patroller-show ~ .patroller-show, | ||
.vectorMenu .patroller-show a, | ||
.vectorMenu .sysop-show ~ .sysop-show, | ||
.vectorMenu .sysop-show a { | ||
cursor: pointer; | ||
} | ||
|
||
/* poll-id显示 */ | ||
.ajaxpoll .ajaxpoll-info .ajaxpoll-id-info { | ||
color: inherit; | ||
float: none; | ||
} | ||
|
||
/* 滥用过滤器表格 */ | ||
.mw-special-AbuseFilter .mw-datatable.TablePager { | ||
table-layout: auto; | ||
} | ||
|
||
.mw-special-AbuseFilter .mw-datatable.TablePager .TablePager_col_af_id { | ||
width: 6em; | ||
} | ||
|
||
.mw-special-AbuseFilter .mw-datatable.TablePager tbody .TablePager_col_af_id, | ||
.mw-special-AbuseFilter .mw-datatable.TablePager tbody .TablePager_col_af_enabled, | ||
.mw-special-AbuseFilter .mw-datatable.TablePager tbody .TablePager_col_af_hidden { | ||
padding-left: 0.5em !important; | ||
} | ||
|
||
.mw-special-AbuseFilter .mw-datatable.TablePager .TablePager_col_af_enabled, | ||
.mw-special-AbuseFilter .mw-datatable.TablePager .TablePager_col_af_hidden { | ||
width: 4em; | ||
} | ||
|
||
/* 过滤器历史优化(只是强迫症) */ | ||
.TablePager_col_afh_id { | ||
text-align: center; | ||
} | ||
|
||
/* 防止误删 */ | ||
.page-Category_即将删除的页面 #ca-delete { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"use strict"; | ||
(async () => { | ||
const sleep = (ms) => new Promise((res) => setTimeout(res, ms)); | ||
/* 函数定义块 */ | ||
//添加删除原因链接 | ||
function addLink($obj, act) { | ||
const href = $obj.css("margin-left", "1em")[0].href, | ||
reasonPageName = href.slice(href.indexOf("title=") + 6, href.indexOf("&action")); | ||
$obj.before(`<a target="_blank" href="/${reasonPageName}">浏览${act}原因</a>`); | ||
} | ||
//i18n语言链接 | ||
function i18nLink() { | ||
$('#mw-content-text a.new[href$="/zh-cn"], #mw-content-text a.new[href$="/zh-tw"], #mw-content-text a.new[href$="/zh-hk"]').each((_, ele) => { | ||
$(ele).removeClass("new").attr({ | ||
title: ele.title.replace(/\/zh-[a-z]+|(页面不存在)/g, ""), | ||
href: ele.href.replace(/\/zh-[a-z]+/g, ""), | ||
}); | ||
}); | ||
} | ||
/* 函数执行块 */ | ||
await $.ready; | ||
//删除、保护、版本删除原因浏览链接 | ||
if (mw.config.get("wgAction") === "delete") { | ||
if ($(".mw-delete-editreasons")[0]) { | ||
addLink($(".mw-delete-editreasons > a"), "删除"); | ||
} | ||
if ($(".mw-filedelete-editreasons")[0]) { | ||
addLink($(".mw-filedelete-editreasons > a"), "删除"); | ||
} | ||
} | ||
if (/protect$/.test(mw.config.get("wgAction")) && $(".mw-protect-editreasons")[0]) { | ||
addLink($(".mw-protect-editreasons > a"), "保护"); | ||
} | ||
if (mw.config.get("wgCanonicalSpecialPageName") === "Revisiondelete" && $(".mw-revdel-editreasons")[0]) { | ||
addLink($(".mw-revdel-editreasons > a"), "删除"); | ||
} | ||
//i18n语言链接 | ||
i18nLink(); | ||
//替换文本默认不勾选「通过Special:最近更改和监视列表通知这些编辑」 | ||
if (mw.config.get("wgCanonicalSpecialPageName") === "ReplaceText" && $("#doAnnounce")[0]) { | ||
$("#doAnnounce, #mw-search-ns0").prop("checked", false); | ||
$("#mw-search-ns6").prop("checked", true); | ||
} | ||
})(); | ||
// </pre> |