Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 更新控制台和infobox中tabber拓展溢出问题 #44

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/ConsolePrintWordartLogo/ConsolePrintWordartLogo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(async function () {
const consoleTUrl = `${mw.config.get('wgServer')}/api.php?action=query&meta=siteinfo&formatversion=2&format=json`;
const generatordata = await fetch(consoleTUrl);
const generatordataJson = (await generatordata.json()) as unknown;
const mediawikiVersions = (generatordataJson as {query: {general: {generator: string}}}).query.general.generator;
ZoruaFox marked this conversation as resolved.
Show resolved Hide resolved
const ascii = `
██╗ ██╗ ██████╗ ██╗ ██╗██╗ ██╗
╚██╗ ██╔╝ ██╔═══██╗██║ ╚═╝██║ ╚═╝
╚██╗ ██╔╝██████╗ ██╗ ██╗██║ ╚═╝███████╗ ██████╗ ██╗ ██╗ ██╗ ██╗ ██╗██╗██║ ██╗██╗
╚████╔╝██╔═══██╗██║ ██║╚██████╗ ██╔═══██╗██╔═══██╗██║ ██║ ██║ ██║ ██║██║██║ ██╔╝██║
╚██╔╝ ██║ ██║██║ ██║ ╚════██║██║ ██║██║ ██║██║ ██║ ██║ ██║ ██║██║██████╔╝ ██║
██║ ██║ ██║██║ ██║██ ██║██║ ██║██║ ██║██║ ██║ ██║ ██║ ██║██║██╔══██╗ ██║
██║ ╚██████╔╝╚██████╔╝╚██████╔╝██║ ██║╚██████╔╝╚██████╔╝██╗╚█████ ████╔╝██║██║ ╚██╗██║
╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╚═══╝ ╚═╝╚═╝ ╚═╝╚═╝
©2023-${new Date().getFullYear()} 有兽档案馆 ${mediawikiVersions}
`;
console.log(`%c${ascii}`, 'color:#159c5a');
})();
5 changes: 5 additions & 0 deletions src/ConsolePrintWordartLogo/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* SPDX-License-Identifier: CC-BY-SA-4.0
* _addText: '{{Gadget Header|license=CC-BY-SA-4.0|import=no}}'
* @author 顶呱呱的阿杰
*/
9 changes: 9 additions & 0 deletions src/ConsolePrintWordartLogo/definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"enable": true,
"description": "<sup><abbr title=\"默认为所有注册用户启用\">U</abbr></sup><span id=\"Gadget-NavbarAvatar\"></span> NavbarAvatar <small>在导航栏显示用户头像。</small>",
"section": "browser",
"default": true,
"dependencies": ["mediawiki.user"],
"hidden": true,
"rights": ["edit"]
}
ZoruaFox marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions src/SkinCitizen_CSS/SkinCitizen_CSS.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import './modules/fix-site-icon.less';
@import './modules/hide-sub.less';
@import './modules/HYYouShouYan.less';
@import './modules/infobox-tabber-overflow-repair.less';
@import './modules/mobile-style.less';
@import './modules/pages-style-repair.less';
@import './modules/page-width.less';
Expand Down
18 changes: 18 additions & 0 deletions src/SkinCitizen_CSS/modules/infobox-tabber-overflow-repair.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 修复tabber扩展在infobox中溢出的问题 by awajie
.infobox {
tbody {
> tr:nth-child(1) {
td {
display: flex;
flex-direction: column;
overflow-x: auto;
.tabber__header .tabber__header__prev::after,
.tabber__header .tabber__header__next::after {
display: block;
width: 100%;
height: 100%;
}
}
}
}
}