Skip to content

Instantly share code, notes, and snippets.

@promovicz
Last active November 19, 2022 23:26
Show Gist options
  • Save promovicz/80353c6a5f0180488d0e7efdff2c15dd to your computer and use it in GitHub Desktop.
Save promovicz/80353c6a5f0180488d0e7efdff2c15dd to your computer and use it in GitHub Desktop.
Mastodon 4: UI customizations
/* Hide navigation bar logo */
.navigation-panel__logo {
display: none;
}
/* Hide header logo */
.ui__header__logo svg {
display: none;
}
/* Toot button */
.ui__header__links > .button[href="/publish"],
.compose-form__publish-button-wrapper > .button.button--block {
font-size: 0 !important;
}
.ui__header__links > .button[href="/publish"]::after,
.compose-form__publish-button-wrapper > .button.button--block::after {
content: "Love!";
text-transform: none;
font-size: 15px;
position: relative;
bottom: -2px;
}
/* Patching function called after page load */
function patchMastodonUI() {
/* Insert the hostname as the logo for the mobile layout */
$(".ui__header").prepend("<span style='font-size: 16px;padding:15px;'>"+window.location.hostname+"</span>");
}
/* Hook up the patching function */
$(document).ready(patchMastodonUI);
@promovicz
Copy link
Author

promovicz commented Nov 19, 2022

Using the JavaScript bit requires injecting JQuery. The extension "User JavaScript and CSS" does that for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment