Skip to content

Commit

Permalink
fix: 更新控制台和infobox中tabber拓展溢出问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdgg committed Nov 13, 2024
1 parent aadf67e commit 32fc367
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
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;
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"]
}
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%;
}
}
}
}
}

0 comments on commit 32fc367

Please sign in to comment.