Skip to content

[Flight Rising] Better Effects UI by a11y

Screenshot of [Flight Rising] Better Effects UI

Details

Authora11y

LicenseMIT-0

Categoryflightrising

Created

Updated

Size6.3 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Cleans up a number of interface components related to the new Effects feature. All changes are toggleable.

Notes

  • The Effects feature is brand new, so the site code is liable to change at any time. In case of any breakages, I'll do my best to push out fixes for this userstyle ASAP.

  • The navigation bar in the preview image is styled by my Navbar Icons userstyle, which is completely separate from (but fully compatible with) this one. ✨
     

Changelog

[v2.0.0] - 2025-02-15

  • Staff has implemented full-size Effect previews in the Game DB (rendering v1.0.0 of this userstyle obsolete)... but the layout they went with is certainly a choice. This style now provides the option to clean up that layout.

  • A number of other interface components related to Effects can now also be cleaned up by this userstyle:

    • The [effect dragon=#] BBCode widget
    • The "Apply Effect" page in dragon customization
    • Those pesky empty boxes in the "Personal Style" section of dragon profiles
       
  • I'll add screenshots for the new features (and update the preview image) when I'm less sleepy. 😴

 

[v1.0.0] - 2025-02-13

  • Initial release.

Source code

/* ==UserStyle==
@name         [Flight Rising] Better Effects UI
@version      2.0.0
@namespace    https://userstyles.world/user/a11y
@description  Cleans up a number of interface components related to the new Effects feature. All changes are toggleable.
@author       a11y
@license      MIT-0

@preprocessor stylus

@var checkbox bbcodeWidgets "Streamline BBCode widget interface" 1
@var checkbox gameDatabase "Improve Game DB layout for Effects" 1
@var checkbox applyEffect "Improve \"Apply Effect\" page interface" 1
@var checkbox personalStyle "Hide empty boxes in \"Personal Style\"" 1
==/UserStyle== */

@-moz-document domain("flightrising.com") {
  if bbcodeWidgets {
    .dragon-effect-frame[data-layout="bbcode"] .dragon-effect-controls {
      animation: none !important;

      &, .dragon-effect-controls-inset, .dragon-effect-controls-inset-action, .dragon-effect-controls-link {
        width: 382px;
        height: 382px;
        margin: 0;
      }

      &, .dragon-effect-controls-inset, .dragon-effect-controls-play-pause {
        display: block;
        position: absolute;
        left: 0;
        bottom: 0;
      }

      &, .dragon-effect-controls-inset {
        background: none;
        border: none;
      }

      .dragon-effect-controls-inset-text {
        display: none;
      }

      .dragon-effect-controls-link {
        position: static;

        img {
          display: none;
        }
      }

      .dragon-effect-controls-play-pause {
        z-index: 10;
        padding: 16px;
        cursor: pointer;

        @media (hover: hover) {
          opacity: 0;
          transition: opacity 0.15s ease-in;
        }
      }

      &:hover .dragon-effect-controls-play-pause {
        opacity: 1;
      }
    }
  }
}

@-moz-document url-prefix("https://www1.flightrising.com/dragon/") {
  if personalStyle {
    #dragon-profile-details-style .dragon-profile-item-blank {
      opacity: 0;
    }
  }
}

@-moz-document url-prefix("https://www1.flightrising.com/dragon-effect/") {
  if applyEffect {
    #choose-effect-page {
      .dragon-effect-frame[data-layout="minimal"] {
        animation: none !important;

        &:only-child {
          &::after {
            content: "This dragon does not currently have an Effect.";
            display: block;
            border: 1px solid #e1ddd6;
            border-radius: 10px;
            padding: 12px;
            text-align: center;
          }

          .dragon-effect-controls {
            display: none !important;
          }
        }

        &:not(:only-child) .dragon-effect-controls {
          width: 382px;
          height: 382px;
          background: none;
          border: none;

          &, .dragon-effect-controls-play-pause {
            display: block;
            position: absolute;
            left: initial;
            right: 0;
            bottom: 0;
            margin: 0;
          }

          .dragon-effect-controls-play-pause {
            padding: 16px;
            cursor: pointer;

            @media (hover: hover) {
              opacity: 0;
              transition: opacity 0.15s ease-in;
            }
          }

          &:hover .dragon-effect-controls-play-pause {
            opacity: 1;
          }
        }
      }

      .dragon-effect-current {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-right: 14px;

        &::after {
          display: none;
        }

        &, .dragon-effect-current-icon {
          margin: 0;
        }

        .dragon-effect-current-description {
          flex-grow: 1;
        }
      }

      .common-ui-button.common-tab-filter {
        display: none;
      }

      .common-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0 5px;
        
        .common-tab {
          display: flex;
          justify-content: center;
          flex: 1 0 auto;
          margin: 0;
        }
      }

      .common-filters {
        display: block !important;
        
        .common-filter-name {
          display: none;
        }
      }

      .choose-effect-list {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px 5px;
        height: auto;
        min-height: 87px;
        max-height: 300px;

        .choose-effect-item .itemicon {
          width: 85px;
          height: 85px;
          cursor: pointer;
        }
      }

      .common-message-small.common-message-info {
        background-position: 15px center;
        padding: 15px 20px 15px 60px;
        font-size: 11px;

        & > strong {
          font-weight: normal;
        }
      }
    }
  }
}

@-moz-document url-prefix("https://www1.flightrising.com/game-database/item/") {
  if dbPreviews {
    .dragon-effect-frame[data-layout="gamedb"] {
      display: flex;
      flex-direction: column-reverse;
      align-items: center;
      height: 460px;

      .dragon-effect-controls {
        animation: none !important;
        position: relative;
        left: 0;
        bottom: 10px;

        &, .dragon-effect-controls-play-pause {
          display: block;
        }

        .dragon-effect-controls-inset {
          width: 280px;
          display: flex;
          align-items: center;
          justify-content: center;

          .dragon-effect-controls-preview {
            width: 100%;
            display: flex;
            justify-content: end;
          }
        }
      }
    }
  }
}

@-moz-document regexp("https:\/\/www1\.flightrising\.com\/game-database\/item\/619(2[5-8]|3[024689]|41)(\?.+|$)"), regexp("https:\\/\\/www1\\.flightrising\\.com\\/game-database\\/item\\/\\d+\\?dragon_id=\\d+") {
  if gameDatabase {
    #game-database-record-standard-description {
      width: 234px;
      height: 454px;
      overflow: auto;
      position: absolute;
      left: 440px;
      bottom: 0px;
      border: 1px solid #888;
      border-radius: 8px;
      padding: 12px;
    }
  }
}

Reviews

No reviews yet.