MediaWiki:Gadget-VectorThemeLoader.js:修订间差异

无编辑摘要
(区分新旧版vector皮肤)
无编辑摘要
第82行: 第82行:


   // src/utils/utils.ts
   // src/utils/utils.ts
  var i = document.createElement("textarea");
  i.setAttribute("style", "pointer-events:none;opacity:0;position:fixed;");
   function clickOutside(el, callback) {
   function clickOutside(el, callback) {
     const cb = (ev) => {
     const cb = (ev) => {
第181行: 第179行:
     book: {
     book: {
       name: "仿MCBBS书页风格",
       name: "仿MCBBS书页风格",
      common: "MediaWiki:Vector-Legacy-Book.css",
       default: {
       default: {
         name: "夏季主题",
         name: "夏季主题",
第195行: 第192行:
     v4: {
     v4: {
       name: "仿MCBBS v4风格",
       name: "仿MCBBS v4风格",
      common: "MediaWiki:Vector-V4.css",
       default: { name: "默认风格", css: "MediaWiki:EEEEE.css" },
       default: { name: "默认风格", css: "MediaWiki:Vector-V4.css" },
       other: {}
       other: {}
     }
     }
第206行: 第202行:
     const styleMap = themeMap[style] || themeMap[defaultStyle];
     const styleMap = themeMap[style] || themeMap[defaultStyle];
     const currentCommonStyle = styleMap.common;
     const currentCommonStyle = styleMap.common;
     loadWikiStyle(currentCommonStyle, "salt-wiki-style-common");
     if (currentCommonStyle)
      loadWikiStyle(currentCommonStyle, "salt-wiki-style-common");
     const currentTheme = theme === "default" || !styleMap.other[theme] ? styleMap.default : styleMap.other[theme];
     const currentTheme = theme === "default" || !styleMap.other[theme] ? styleMap.default : styleMap.other[theme];
     loadWikiStyle(currentTheme.css, "salt-wiki-style-theme");
     loadWikiStyle(currentTheme.css, "salt-wiki-style-theme");
维护员、​界面管理员、​巡查员、​监督员、​小部件编辑者
3,469

个编辑