Advertisement
MeKLiN2

compact

Jan 27th, 2024
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Stumblechat chat compact
  3. // @namespace https://greasyfork.org/en/users/1244737
  4. // @version 1
  5. // @description Makes the messages only use 1 line.
  6. // @author robomoist
  7. // @license MIT
  8. // @grant GM_addStyle
  9. // @run-at document-start
  10. // @include https://stumblechat.com/room/*
  11. // @downloadURL https://update.greasyfork.org/scripts/484175/Stumblechat%20chat%20compact.user.js
  12. // @updateURL https://update.greasyfork.org/scripts/484175/Stumblechat%20chat%20compact.meta.js
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. let css = `
  17. .message .nickname ~ .content {
  18. display: inline-block;
  19. top: -7px;
  20. position: relative;
  21. margin-left: 2px;
  22. margin-right: 1em;
  23. }
  24. .content + .content {
  25. display: inline-block!important;
  26. margin-right: 1em;
  27. }
  28. .message .nickname ~ .content span {
  29. line-height: 1.5em;
  30. }
  31. `;
  32. if (typeof GM_addStyle !== "undefined") {
  33. GM_addStyle(css);
  34. } else {
  35. let styleNode = document.createElement("style");
  36. styleNode.appendChild(document.createTextNode(css));
  37. (document.querySelector("head") || document.documentElement).appendChild(styleNode);
  38. }
  39. })();
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement