Mastodon BirdUI Style Override

Changes the style of Mastodon to BirdUI (https://github.com/ronilaukkarinen/mastodon-bird-ui) by Rolle (https://mementomori.social/@rolle)

  1. // ==UserScript==
  2. // @name Mastodon BirdUI Style Override
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4
  5. // @description Changes the style of Mastodon to BirdUI (https://github.com/ronilaukkarinen/mastodon-bird-ui) by Rolle (https://mementomori.social/@rolle)
  6. // @author Cragsand - (https://universeodon.com/@cragsand)
  7. // @match https://universeodon.com/*
  8. // @match https://mastodon.social/*
  9. // @grant GM_getResourceText
  10. // @grant GM_addStyle
  11. // @license MIT License
  12. // @resource cssFile https://raw.githubusercontent.com/ronilaukkarinen/mastodon-bird-ui/master/layout-single-column.css
  13. // ==/UserScript==
  14.  
  15. // INSTRUCTIONS
  16. // To add support for more instances
  17. // Add another @match followed by the URL to your instance
  18.  
  19. (function() {
  20. 'use strict';
  21.  
  22. // Apply the CSS from Rolles repo
  23. var cssText = GM_getResourceText('cssFile');
  24. GM_addStyle(cssText);
  25.  
  26. // Change background to black like Twitter - Add two slashes in front to disable
  27. document.documentElement.style.setProperty('--color-brand-mastodon-bg', 'black');
  28.  
  29. // Fix an error in the CSS by overriding the style for threaded replies
  30. // Comment out or remove this section once it's been fixed
  31. var customCSS = `
  32. .status--in-thread .status__content.status__content--with-action {
  33. padding-left: 0px !important;
  34. }
  35. `;
  36. // Apply the CSS error correction
  37. GM_addStyle(customCSS);
  38.  
  39. })();