Discourse - Collapse Boosts

自动折叠 boost。

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

/* ==UserStyle==
@name           Discourse - Collapse Boosts
@namespace      https://github.com/utags
@version        3.0.0
@description    自动折叠 boost。
@author         Pipecraft
@license        MIT
@icon           https://www.google.com/s2/favicons?sz=64&domain=meta.discourse.org
==/UserStyle== */

@-moz-document domain("meta.discourse.org"), domain("linux.do"), domain("idcflare.com"), domain("www.nodeloc.com"), domain("meta.appinn.net"), domain("community.openai.com"), domain("community.cloudflare.com"), domain("community.wanikani.com"), domain("forum.cursor.com"), domain("forum.obsidian.md"), domain("forum-zh.obsidian.md"), domain("www.uscardforum.com") {
  .discourse-boosts__list {
    max-width: fit-content;
  }

  /* 第三个和它后面的 boost */
  .discourse-boosts__bubble:nth-child(n + 3) {
    opacity: 0%;
    display: inline-flex;
    max-inline-size: 0;
    max-block-size: 0;
    padding: 0;
    margin-inline-start: calc(var(--space-1) * -1);
    overflow: hidden;
    pointer-events: none;
    transition-property:
      opacity, max-inline-size, max-block-size, padding, margin-inline-start;
    transition-duration: 180ms, 0ms, 0ms, 0ms, 0ms;
    transition-delay: 0ms, 0ms, 0ms, 0ms, 0ms;
    transition-timing-function: ease, linear, linear, linear, linear;
  }
  /* 第二个 boost */
  .discourse-boosts__bubble:nth-child(2) {
    opacity: 50%;
    transition: opacity 180ms ease;
  }
  /* 鼠标移到第二个 boost 上面时,或仅有两个 boost 时 */
  .discourse-boosts__bubble:nth-child(2):hover,
  .discourse-boosts__bubble:nth-child(2).discourse-boosts__bubble:last-of-type {
    opacity: 100%;
  }
  /* 鼠标移到 boost 上面时 */
  .discourse-boosts__list:hover .discourse-boosts__bubble {
    opacity: 100%;
    max-inline-size: 999px;
    max-block-size: 999px;
    padding: var(--space-1) var(--space-2) var(--space-1) var(--space-1);
    margin-inline-start: 0;
    pointer-events: auto;
    transition-delay: 120ms, 120ms, 120ms, 120ms, 120ms;
  }

  .discourse-boosts-trigger {
    order: -1;
  }
}