Skip to content

Floatplane Customization by BobVonBob

Screenshot of Floatplane Customization

Details

AuthorBobVonBob

LicenseMIT

Categoryfloatplane

Created

Updated

Code size2.1 kB

Code checksum5addbda7

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Small tweaks to the Floatplane video player and livestream chat including custom font sizes and hiding elements.

Formerly "Floatplane Chat Customization".

Notes

Floatplane changed all their class names recently, which required new selectors for everything. I made a best guess at selectors for polls, but the only channel I'm subscribed to on Floatplane is not currently streaming, which means no polls to test with. Apologies if the poll options don't work.

Source code

/* ==UserStyle==
@name           Floatplane Customization
@namespace      Floatplane
@version        2.0.0
@description    Customize your Floatplane
@author         BobVonBob
@license        MIT
@preprocessor   stylus

@var checkbox hidePlay  "Video Player: Hide central play button while paused" 1

@var checkbox pollWrap  "Live Chat: Wrap poll titles at whole words" 1
@var checkbox hideTitle "Live Chat: Hide \"Live Chat\" title"        1
@var checkbox hideHint  "Live Chat: Hide send message hint"          0
@var checkbox hideIcon  "Live Chat: Hide input box avatar"           0

@var number   fontSize  "Live Chat: Font size (px)"              [11, 1, 100, 1, "px"]
@var checkbox inputSize "Live Chat: Font size affects input box" 1
@var checkbox pollSize  "Live Chat: Font size affects polls"     1
==/UserStyle== */

@-moz-document domain("floatplane.com") {
    if hidePlay {
        .has-started > div[title="Play video"] {
            display: none;
            visibility: hidden;
        }
    }

    if pollWrap {
        div[class*="pollTitle"] {
            word-break: normal;
        }
    }
    
    if hideTitle {
        div[class*="panelHeader"] > div[class*="title"] {
            display: none;
            visibility: hidden;
        }
    }
    
    if hideHint {
        div[class*="hintContainer"] {
            display: none;
            visibility: hidden;
        }
    }

    if hideIcon {
        div[class*="iconSelf"] {
            display: none;
            visibility: hidden;
        }
    }

    if inputSize {
        div {
            --live-chat-font-size: fontSize;
            --live-chat-line-height: (fontSize / 0.6);
        }
    } else {
        div[class*="chat-message-list"] {
            --live-chat-font-size: fontSize;
            --live-chat-line-height: (fontSize / 0.6);
        }
    }
    
    if pollSize {
        div[class*="pollTitle"] {
            font-size: fontSize;
        }
    
        div[class*="optionLabel"] {
            font-size: fontSize;
            line-height: fontSize;
        }
    }
}

Reviews

No reviews yet.