TYPO3Dark

Fixes for TYPO3 dashboards when using Dark Reader.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

/* ==UserStyle==
@name               TYPO3Dark
@namespace          sun/userstyles
@version            1.5.14
@description        Fixes for TYPO3 dashboards when using Dark Reader.
@compatible         chrome
@compatible         edge
@compatible         firefox
@compatible         opera
@compatible         safari
@homepageURL        https://forgejo.sny.sh/sun/userstyles
@supportURL         https://forgejo.sny.sh/sun/userstyles/issues
@contributionURL    https://liberapay.com/sun
@contributionAmount €1.00
@author             Sunny <[email protected]>
@icon               https://forgejo.sny.sh/sun/userstyles/raw/branch/main/icons/TYPO3Dark.ico
@copyright          2020-present, Sunny (https://sny.sh/)
@license            Hippocratic License; https://forgejo.sny.sh/sun/userstyles/src/branch/main/LICENSE.md
@preprocessor       stylus
@var                checkbox fixmm "Fix module menu"      1
@var                checkbox fixpt "Fix page tree"        1
@var                checkbox fixic "Fix icons and images" 1
@var                checkbox fixal "Fix access legend"    1
@var                checkbox fixad "Fix Adminer"          1
@var                checkbox fixpm "Fix phpMyAdmin"       1
@var                checkbox supt7 "Support TYPO3 v7"     1
@var                checkbox supt6 "Support TYPO3 v6"     1
==/UserStyle== */

@-moz-document regexp(".*/typo3/.*") {
  @media not print {
    if fixmm {
      .modulemenu-action:not(:disabled):hover,
      .modulemenu-action-active {
        background-color: rgba(255, 255, 255, 0.125) !important;
        box-shadow: none !important;
      }
      .modulemenu-action:not(:disabled):focus {
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
      }
    }
    if fixpt {
      .svg-tree-wrapper {
        .node-name {
          filter: invert(1);
        }
        .node-selected {
          fill: rgba(255, 255, 255, 0.125);
        }
        .node-over:not(.node-selected) {
          fill: rgba(255, 255, 255, 0.25);
        }
        .node-selected,
        .node-over:not(.node-selected) {
          stroke: none;
        }
        .links {
          opacity: 0.5;
        }
        .nodes-wrapper--dragging .node-over {
          filter: invert(1) hue-rotate(180deg);
        }
      }
    }
    if fixic {
      img {
        &[src^="/typo3/sysext/core/Resources/Public/Icons/T3Icons/actions"],
        &[src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/spinner/spinner-circle.svg"],
        &[src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/spinner/spinner-circle-dark.svg"],
        &[src="/typo3conf/ext/news/Resources/Public/Icons/donation.svg"] {
          filter: invert(1) hue-rotate(180deg);
        }
        &[src="/typo3/sysext/backend/Resources/Public/Images/typo3_black.svg"],
        &[src="/typo3/sysext/backend/Resources/Public/Images/typo3_orange.svg"],
        &[src="/typo3/sysext/install/Resources/Public/Images/typo3_orange.svg"] {
          filter: invert(1) hue-rotate(180deg) brightness(1.54);
        }
      }
      select.form-control:not(.form-select-no-siblings) {
        &:not([size]),
        &[size="1"] {
          background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M8.37 10.47a.506.506 0 0 1-.72 0L4.11 6.93c-.2-.2-.2-.5 0-.7l.7-.7c.2-.2.5-.2.7 0l2.5 2.5 2.5-2.5c.2-.2.5-.2.7 0l.7.7c.2.2.2.5 0 .7l-3.54 3.54z'/%3E%3C/svg%3E");
          background-repeat: no-repeat;
          background-position: right;
        }
      }
    }
    if fixal {
      .access-legend {
        .vr,
        .hr,
        .edge {
          filter: invert(1);
        }
      }
    }
    if supt7 {
      .typo3-topbar-navigation-items > li > a,
      [id="typo3-menu"] .typo3-module-menu-group {
        border: none;
      }
    }
    if supt6 {
      #typo3-index-php {
        background-color: #494949;
      }
      div.typo3-dyntabmenu-divs {
        background-image: none;
      }
    }
  }
}

@-moz-document regexp(".*/typo3conf/ext/t3adminer/.*/t3adminer.php.*"), regexp(".*/typo3/index.php\\?route=%2Fmodule%2Ftools%2Ftxt3adminer.*") {
  @media not print {
    if fixad {
      .footer {
        border-image: linear-gradient(rgba(24, 26, 27, 0.2), #181a1b) 100% 0;
      }
      .links,
      #tables,
      td {
        a::before {
          filter: invert(1);
        }
      }
    }
  }
}

@-moz-document regexp(".*/typo3conf/ext/phpmyadmin/.*/index.php.*"), regexp(".*/typo3/index.php\\?route=%2Fmodule%2Ftools%2FPhpmyadmin.*") {
  @media not print {
    if fixpm {
      #pma_navigation,
      .ui-widget-header,
      .ui-dialog-buttonpane button,
      .ui-dialog-buttonpane button:hover {
        background-image: none;
      }
    }
  }
}