diff --git a/src/ConsolePrintWordartLogo/ConsolePrintWordartLogo.ts b/src/ConsolePrintWordartLogo/ConsolePrintWordartLogo.ts new file mode 100644 index 0000000..d4bfbc9 --- /dev/null +++ b/src/ConsolePrintWordartLogo/ConsolePrintWordartLogo.ts @@ -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'); +})(); diff --git a/src/ConsolePrintWordartLogo/LICENSE b/src/ConsolePrintWordartLogo/LICENSE new file mode 100644 index 0000000..e196e70 --- /dev/null +++ b/src/ConsolePrintWordartLogo/LICENSE @@ -0,0 +1,5 @@ +/** + * SPDX-License-Identifier: CC-BY-SA-4.0 + * _addText: '{{Gadget Header|license=CC-BY-SA-4.0|import=no}}' + * @author 顶呱呱的阿杰 + */ \ No newline at end of file diff --git a/src/ConsolePrintWordartLogo/definition.json b/src/ConsolePrintWordartLogo/definition.json new file mode 100644 index 0000000..2f8b46f --- /dev/null +++ b/src/ConsolePrintWordartLogo/definition.json @@ -0,0 +1,7 @@ +{ + "enable": true, + "description": "UConsolePrintWordartLogo", + "section": "browser", + "default": true, + "hidden": true, +} diff --git a/src/SkinCitizen_CSS/SkinCitizen_CSS.less b/src/SkinCitizen_CSS/SkinCitizen_CSS.less index 946f721..958b52a 100644 --- a/src/SkinCitizen_CSS/SkinCitizen_CSS.less +++ b/src/SkinCitizen_CSS/SkinCitizen_CSS.less @@ -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'; diff --git a/src/SkinCitizen_CSS/modules/infobox-tabber-overflow-repair.less b/src/SkinCitizen_CSS/modules/infobox-tabber-overflow-repair.less new file mode 100644 index 0000000..dbec086 --- /dev/null +++ b/src/SkinCitizen_CSS/modules/infobox-tabber-overflow-repair.less @@ -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%; + } + } + } + } +}