Microsoft Copilot responsive + customizations

Microsoft Copilot website is more suitable for wide screens.

当前为 2025-02-13 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. @name Microsoft Copilot responsive + customizations
  3. @version 1.0.1
  4. @description Microsoft Copilot website is more suitable for wide screens.
  5. @author BreatFR (https://breat.fr)
  6. @namespace https://gitlab.com/breatfr
  7. @homepageURL https://gitlab.com/breatfr/microsoft-copilot
  8. @supportURL https://discord.gg/Q8KSHzdBxs
  9. @license AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
  10. @preprocessor stylus
  11.  
  12. @var checkbox chatmode "Chat mode" 1
  13. @var text fontsize "Font size" 1.2rem
  14. @var checkbox hidecopilotpro "Hide Copilot Pro" 1
  15. @var checkbox hidedownloadapp "Hide Download Application" 1
  16. @var checkbox widemode "Wide mode" 1
  17. ==/UserStyle== */
  18.  
  19. /* === Credits ===
  20. Website https://breat.fr
  21. facebook https://www.facebook.com/breatfroff
  22. mastodon https://mastodon.social/@breat_fr
  23. telegram https://t.me/breatfr
  24. vk https://vk.com/breatfroff
  25. X (twitter) https://x.com/breatfroff
  26. === Credits === */
  27.  
  28. @-moz-document domain("copilot.microsoft.com") {
  29. /* =============================================
  30. Whole website
  31. ============================================= */
  32. /* Font size */
  33. .text-3xs,
  34. .text-base,
  35. .text-sm,
  36. p,
  37. span {
  38. font-size: fontsize !important;
  39. line-height: 1.5 !important;
  40. }
  41. /* Fix background for source number with bigger font size */
  42. .dark\\:bg-slate-750:is([data-theme=dark] *),
  43. .light\\:bg-slate-750:is([data-theme=light] *) {
  44. height: auto;
  45. padding: 0 .5em;
  46. }
  47. if hidecopilotpro {
  48. [data-testid="settings-menu"] > div > div:nth-of-type(1) {
  49. display: none;
  50. }
  51. }
  52. if hidedownloadapp {
  53. [data-testid="settings-menu"] > div > button[data-testid="promotion-button"],
  54. [data-testid="settings-menu"] > div > div:nth-of-type(4) {
  55. display: none;
  56. }
  57. }
  58.  
  59. if widemode {
  60. [data-testid="composer"] > div:nth-of-type(2) > div,
  61. [data-testid="composer"] > div:nth-of-type(2) > div > div:nth-of-type(2) > div > div {
  62. max-width: 100%;
  63. width: 100%
  64. }
  65. [data-testid="settings-menu"] > div > div:last-child {
  66. flex-wrap: nowrap;
  67. white-space: nowrap;
  68. }
  69. [data-testid="settings-menu"] > div > div:last-child > a:first-child {
  70. order: 3;
  71. }
  72. }
  73. }
  74.  
  75. @-moz-document url("https://copilot.microsoft.com/") {
  76. /* ===================================================
  77. Discover page
  78. =================================================== */
  79. if widemode {
  80. [data-testid="discover-page"] > div {
  81. max-width: 100%;
  82. width: 100%
  83. }
  84. [data-testid="discover-page"] > div > section > div {
  85. display: flex;
  86. flex-wrap: wrap;
  87. gap: 2em;
  88. justify-content: center;
  89. }
  90. [data-testid="discover-page"] > div > section > div > button,
  91. [data-testid="discover-page"] > div > section > div > div {
  92. width: 30%;
  93. }
  94. [data-testid="discover-page"] > div > section > div > button > div,
  95. [data-testid="discover-page"] > div > section > div > div > div {
  96. flex-direction: column;
  97. }
  98. [data-testid="discover-page"] > div > section > div > button > div > div,
  99. [data-testid="discover-page"] > div > section > div > div > div > div {
  100. font-size: 1.5rem;
  101. font-variation-settings: "opsz" 40, "wght" 440;
  102. justify-content: center;
  103. line-height: 1.9375rem;
  104. letter-spacing: -.01em;
  105. padding-inline-end: 1rem;
  106. padding-bottom: 1.25rem;
  107. }
  108. [data-testid="discover-page"] > div > section > div > button > div > div > h2,
  109. [data-testid="discover-page"] > div > section > div > div > div > div > h2 {
  110. text-align: center;
  111. }
  112. [data-testid="discover-page"] > div > section > div > button > div > img,
  113. [data-testid="discover-page"] > div > section > div > div > div > img {
  114. flex-shrink: 1;
  115. object-fit: cover;
  116. width: 100%
  117. }
  118. }
  119. }
  120.  
  121. @-moz-document url-prefix("https://copilot.microsoft.com/chats/") {
  122. /* ================================================================
  123. Chats
  124. ================================================================ */
  125. if chatmode {
  126. [data-content="ai-message"] {
  127. max-width: 80%;
  128. }
  129. }
  130. if widemode {
  131. [data-content="conversation"]{
  132. max-width: 100%;
  133. width: 100%
  134. }
  135. }
  136. }