更好的通义浏览器扩展

去除通义浏览器扩展的悬浮球并加强扩展体验

/* ==UserStyle==
@name           更好的通义浏览器扩展
@namespace      better_tongyi_browser_extension
@version        1.0.0
@description    去除通义浏览器扩展的悬浮球并加强扩展体验
@author         lingbopro
@license        WTFPL
@preprocessor   stylus
@var checkbox hideFloatBall "隐藏悬浮球" 1
@var checkbox hideSelectionTooltip "隐藏文本选择时的工具框" 0
@var checkbox showSelectionTooltipOnFloat "文本选择工具框鼠标悬浮在图标上时展开" 1
==/UserStyle== */

@-moz-document url-prefix("http") {
    /* 通义优化 */
    if hideFloatBall {
        tongyi-web-extension .react-draggable {
            display: none;
        }
    }
    if hideSelectionTooltip {
        tongyi-web-extension [data-role=tongyi-selection-ops-popover] {
            display: none;
        }
    }
    if showSelectionTooltipOnFloat {
        tongyi-web-extension [data-role=tongyi-selection-ops-popover] * {
            transition: ease-in-out 0.5s;
            max-width: 100px;
            max-height: 40px;
        }
        tongyi-web-extension .ant-popover:has([data-role=tongyi-selection-ops-popover]):not(:hover) .ant-popover-inner {
            padding: 0!important;
        }
        tongyi-web-extension [data-role=tongyi-selection-ops-popover]:not(:hover) *:not(img) {
            /* display: none; */
            max-width: 0;
            max-height: 0;
            margin: 0;
            padding: 0;
            border: 0;
            overflow: hidden;
        }
        tongyi-web-extension [data-role=tongyi-selection-ops-popover]:not(:hover)>:first-child {
            margin-right: 0!important;
        }
    }
}