Skip to content

Duolingo - Customization by jesuscc1993

Imported and mirrored from https://github.com/jesuscc1993/user-css/raw/develop/duolingo/duolingo-customization/duolingo-customization.user.css

Screenshot of Duolingo - Customization

Details

Authorjesuscc1993

LicenseCC BY-SA 4.0

Categoryunset

Created

Updated

Size4.0 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Provides some extra customization options for Duolingo. DISCLAIMER: some features are currently not supported on Firefox.

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name           Duolingo - Customization
@description    Provides some extra customization options for Duolingo. DISCLAIMER: some features are currently not supported on Firefox.
@version        2024.09.07.18.32
@author         MetalTxus
@namespace      https://github.com/jesuscc1993/
@license        CC BY-SA 4.0
@preprocessor   stylus

@var  checkbox  hide-leagues                        "Hide leagues"                                 0
@var  checkbox  hide-goals                          "Hide goals"                                   0
@var  checkbox  hide-premium                        "Hide some premium adds and features"          0
@var  checkbox  hide-leaderboards                   "Hide leaderboards"                            0
@var  checkbox  hide-classes                        "Hide classes"                                 0
@var  checkbox  hide-pronunciation                  "Hide pronunciation"                           0
@var  checkbox  hide-pronunciation-unless-hovered   "Hide pronunciation (unless hovered)"          0
@var  checkbox  hide-characters                     "Hide Duolingo characters"                     0
@var  checkbox  center-lesson-title                 "Center lesson title"                          0
@var  text      lesson-width                        "Lesson width (desktop)"                       600px

==/UserStyle== */
@-moz-document domain("duolingo.com") {
  @media (min-width: 700px) {
    [data-test="player-end-carousel"] > :nth-child(1) {
      width: 100%;
    }

    [data-test="player-end-carousel"] > :nth-child(2) {
      display: none;
    }

    [data-test*="challenge"] > ._2n5fx {
      max-width: none;
      width: lesson-width;
    }

    [aria-label="choice"] {
      width: min(lesson-width, 600px);
      margin: 0 auto;
    }

    /* center lesson title */
    if (center-lesson-title) {
      [data-test="challenge-header"] {
        text-align: center;
      }
    }
  }

  [data-test="challenge-tap-token"] {
    user-select: text;
  }

  /* characters */
  if (hide-characters) {
    /* regular ones */
    ._2qg6J,
    svg[style*="--web-ui_speech-bubble-alignment"] {
      display: none;
    }

    ._2kEEj {
      margin-left: -16px;
    }

    /* grid variant */
    ._1KcR7 {
      opacity: 0;
    }

    ._2kgY1 {
      grid-template-columns: 0 1fr;
      grid-gap: 0;
    }
  }

  /* pronunciation */
  if (hide-pronunciation) {
    ._47IB1._3x_e5._2m_ED {
      display: none;
    }
  }

  if (hide-pronunciation-unless-hovered) {
    ._3PW0K,
    ._1bl79 {
      &:not(:hover) ._47IB1._3x_e5._2m_ED {
        opacity: 0;
      }

      ._47IB1._3x_e5._2m_ED {
        transition: opacity 150ms;
      }
    }
  }

  if (hide-leagues) {
    /*div:has(> div > div > div > [src*="/images/leagues/"]) {*/
    div:has(> div > [data-test="leaderboards-open"]) {
      display: none;
    }
  }

  /* goals */
  if (hide-goals) {
    div:has(> div > div > [src*="/images/goals/"]) {
      display: none;
    }

    [data-test="/settings/coach"] {
      display: none;
    }
  }

  /* premium */
  if (hide-premium) {
    ._3Z2SD, /* review section */
    [data-test="free-plus-button"],
    [href="/review"],
    [href="/settings/super"],
    button:has([src*="/images/super/"]),
    div:has(> [data-test="plus-offer-logo"]),
    div:has(> [src*="/images/super/"]),
    div:has(> div > [data-test="plus-offer-logo"]):has(> div > [src*="practiceHub"]),
    div:has(> div > div > ins),
    /*div:has(> [data-test="plus-offer-logo"]) + div:has(img)*/ {
      display: none !important;
    }
  }

  /* leaderboards */
  if (hide-leaderboards) {
    [href="/leaderboard"] {
      display: none !important;
    }
  }

  /* classes */
  if (hide-classes) {
    [href="https://classes.duolingo.com/"]
    {
      display: none !important;
    }
  }

  /* sidebar item spacing fix */
  ._3bTT7 {
    gap: 0;

    > div > a {
      margin-bottom: 8px;
      display: block;
    }
  }
}

Reviews

No reviews yet.