Discord Classic Style

A twist on Discord's Visual Refresh layout, in order to make it look more classic.

目前为 2025-03-31 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Discord Classic Style
  3. // @name:es Estilo Clásico para Discord
  4. // @namespace ds.js.discord
  5. // @author DragShot
  6. // @oujs:author TheDragShot
  7. // @icon https://favicone.com/discordapp.com?s=32
  8. // @description A twist on Discord's Visual Refresh layout, in order to make it look more classic.
  9. // @description:es Un giro en la interfaz Visual Refresh de Discord, para hacerla verse más clásica.
  10. // @released 2021-06-26
  11. // @updated 2025-03-31
  12. // @lastchanges Updated the positioning of the user panel and the chat box.
  13. // @copyright 2025, DragShot Software
  14. // @homepageURL https://dragshot.webcindario.com/software/discordcs.php
  15. // @license GPL-3.0-only
  16. // @include *discord.com/*
  17. // @version 2.1.0
  18. // @grant none
  19. // ==/UserScript==
  20.  
  21. // Discord Classic Style
  22. // Copyright (C) 2025 DragShot Software
  23. //
  24. // This program is free software: you can redistribute it and/or modify
  25. // it under the terms of the GNU General Public License version 3, as
  26. // published by the Free Software Foundation.
  27. //
  28. // This program is distributed in the hope that it will be useful,
  29. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  30. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. // GNU General Public License for more details.
  32. //
  33. // You should have received a copy of the GNU General Public License
  34. // along with this program. If not, see <https://www.gnu.org/licenses/>.
  35.  
  36. //Helper functions
  37. function addCSS(css) {
  38. var head = document.head || document.getElementsByTagName('head')[0],
  39. style = document.createElement('style');
  40. style.type = 'text/css';
  41. if (style.styleSheet){
  42. style.styleSheet.cssText = css;
  43. } else {
  44. style.appendChild(document.createTextNode(css));
  45. }
  46. head.appendChild(style);
  47. }
  48. //Styles
  49. addCSS(`
  50. /* Hide title bar, push notifications down */
  51.  
  52. * {
  53. --custom-app-top-bar-height: 0px !important;
  54. }
  55.  
  56. /*@supports (grid-template-columns:subgrid) and (white-space-collapse:collapse) {
  57. [class^='container'] > [class^='base']:has(> [class^='bar']) {
  58. grid-template-rows: [top] 0px [titleBarEnd] min-content [noticeEnd] 1fr [end];
  59. }
  60. }*/
  61.  
  62. [class^='base'] > [class^='bar'] {
  63. overflow: visible;
  64. min-height: 0px;
  65. height: var(--custom-app-top-bar-height);
  66. justify-content: end;
  67. }
  68.  
  69. [class^='base'] > [class^='bar'] > :not([class^='trailing']) {
  70. display: none;
  71. }
  72.  
  73. [class^='base'] > [class^='bar'] > [class^='trailing'] {
  74. margin-top: 48px;
  75. margin-right: -4px;
  76. z-index: 500;
  77. }
  78.  
  79. /* Server/Channel list color and offsets */
  80.  
  81. [class^='base']:has(> [class^='notice']) > [class^='bar'] > [class^='trailing'] {
  82. margin-top: calc(48px + (37px * 2));
  83. }
  84.  
  85. [class^='upperContainer'] > [class^='toolbar'],
  86. [class^='container'] [class^='headerBar'] > [class^='searchBar'] {
  87. margin-right: calc(76px + 8px);
  88. }
  89.  
  90. [class^='base'] [class^='sidebar'] [class^='itemsContainer'] > [class^='stack'] {
  91. padding-top: 12px;
  92. padding-bottom: 12px;
  93. }
  94.  
  95. [class^='base'] [class^='sidebar']:has([class^='tree'] > [class^='itemsContainer'])::after {
  96. left: var(--custom-guild-list-width);
  97. }
  98.  
  99. .theme-dark [class^='base'] [class^='sidebar'] [class^='tree']:has(> [class^='itemsContainer'] > [class^='stack']) {
  100. background: rgba(0, 0, 0, 0.45);
  101. }
  102.  
  103. /* Round server icons */
  104.  
  105. [class^='base'] [class^='sidebar'] [role='tree'] [class^='stack'] > [class^='listItem'] > div > [class^='blobContainer']:not(:hover):not([class*='selected']) svg > foreignObject [class^='wrapper'] :is([class^='childWrapper'], img) {
  106. border-radius: 100%;
  107. overflow: hidden;
  108. }
  109.  
  110. /* Server icon size */
  111.  
  112. /* * {
  113. --guildbar-avatar-size: 48px;
  114. }*/
  115.  
  116. /* Docked user panel */
  117.  
  118. [class^='base'] [class^='sidebar'] > [class^='wrapper']:has([role='tree']) {
  119. margin-bottom: 0px;
  120. }
  121.  
  122. [class^='base'] [class^='sidebar'] > [class^='sidebarList'] [class^='scroller'] {
  123. margin-bottom: var(--custom-app-panels-height, 0);
  124. }
  125.  
  126. [class^='base'] [class^='sidebar'] > [class^='sidebarList'] #channels {
  127. margin-bottom: 0px;
  128. }
  129.  
  130. [class^='base'] [class^='sidebar'] [class^='panels']:has([class^='avatarWrapper']) {
  131. bottom: 0px;
  132. left: var(--custom-guild-list-width);
  133. right: 0px;
  134. width: calc(100% - var(--custom-guild-list-width));
  135. border-radius: 0px;
  136. }
  137.  
  138. .theme-dark [class^='base'] [class^='sidebar'] [class^='panels']:has([class^='avatarWrapper']) {
  139. border-color: rgba(0,0,0,0.35);
  140. border-left-color: var(--app-border-frame);
  141. }
  142.  
  143. .theme-dark [class^='base'] [class^='sidebar'] [class^='panels']:has([class^='avatarWrapper']) > div {
  144. background: rgba(0,0,0,0.35);
  145. }
  146.  
  147. /* Categories in all-caps */
  148.  
  149. [class^='sidebarList'] #channels [class^='mainContent'][aria-expanded] [class*='name'],
  150. [class^='sidebarList'] [class^='privateChannels'] [class*='HeaderContainer'] > [class^='headerText'] {
  151. text-transform: uppercase;
  152. font-size: 0.75rem;
  153. line-height: 0.75rem;
  154. font-weight: 600;
  155. }
  156.  
  157. /* Chat text area offset */
  158.  
  159. [class^='chat'] [class^='chatContent'] [class^='channelTextArea'] {
  160. margin-bottom: calc(var(--custom-chat-input-margin-bottom) / 2);
  161. }
  162.  
  163. [class^='chat'] [class^='chatContent'] [class^='typingDots'],
  164. [class^='chat'] [class^='chatContent'] [class^='cooldownWrapper'] {
  165. background: var(--bg-overlay-floating,var(--chat-background-default));
  166. border: 1px solid transparent;
  167. border-bottom-color: var(--border-faint);
  168. border-radius: var(--radius-sm);
  169. padding: 0px 6px;
  170. }
  171.  
  172. /* Darker member list */
  173.  
  174. .theme-dark [class^='chat'] [class^='membersWrap'] > [class^='members'] {
  175. --custom-channel-members-bg: var(--bg-base-tertiary);
  176. }
  177.  
  178. /* DMs call UI Fix */
  179.  
  180. [class^='callContainer'] > [class^='root'] > div > [class^='root'] {
  181. margin-left: auto;
  182. margin-right: auto;
  183. }
  184.  
  185. [class^='callContainer'] > [class^='root'] > div > [class^='root'] > [class^='transition'] {
  186. margin-top: auto;
  187. margin-bottom: auto;
  188. }
  189. `);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址