Androxilogin

Restore old UI (Tampermonkey script)

Oct 29th, 2025 (edited)
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.87 KB | None | 0 0
  1. // ==UserScript==
  2. // @name YouTubeUI Fix
  3. // @namespace http://tampermonkey.net/
  4. // @version 20251022.14.45
  5. // @description Makes new UI look like an old one
  6. // @author You
  7. // @license No License
  8. // @match https://www.youtube.com/*
  9. // @grant GM_addStyle
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. GM_addStyle(`
  16. :root {
  17. --toolbar-height: 52px;
  18. --element-margin: 6px;
  19. --element-height: calc(var(--toolbar-height) - var(--element-margin));
  20. --element-fs-margin: 2px;
  21. --bg-color: #0000;
  22. }
  23.  
  24. /* SIZE */
  25. .ytp-delhi-modern .ytp-tooltip {
  26. margin-top: 12px !important;
  27. }
  28.  
  29. .ytp-delhi-modern .ytp-chrome-bottom,
  30. .ytp-delhi-modern .ytp-chrome-controls,
  31. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-chrome-bottom,
  32. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-right-controls .ytp-right-controls-right,
  33. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-right-controls .ytp-right-controls-left {
  34. height: var(--toolbar-height) !important;
  35. line-height: var(--toolbar-height) !important;
  36. }
  37.  
  38. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-progress-bar-container,
  39. .ytp-delhi-modern:not(.ytp-player-minimized) .ytp-progress-bar-container {
  40. bottom: var(--toolbar-height) !important;
  41. }
  42.  
  43. /* Overlays container */
  44. .ytp-delhi-modern.ytp-big-mode.ytp-fullscreen-grid-peeking .ytp-overlays-container,
  45. .ytp-delhi-modern.ytp-fullscreen-grid-peeking .ytp-overlays-container {
  46. bottom: calc(var(--toolbar-height) + 20px) !important;
  47. }
  48.  
  49. .ytp-delhi-modern .ytp-chrome-controls .ytp-right-controls,
  50. .ytp-delhi-modern .ytp-prev-button:not(.ytp-miniplayer-button-container > *),
  51. .ytp-delhi-modern .ytp-chrome-controls .ytp-next-button:not(.ytp-miniplayer-button-container > *).ytp-playlist-ui {
  52. margin: var(--element-margin) 0 !important;
  53. padding: 0 !important;
  54. }
  55.  
  56. .ytp-delhi-modern .ytp-chrome-controls .ytp-play-button {
  57. margin: var(--element-margin) 0 !important;
  58. }
  59.  
  60. /* Volume */
  61. .ytp-delhi-modern.ytp-delhi-horizontal-volume-controls .ytp-volume-area {
  62. margin: var(--element-margin) 0 !important;
  63. }
  64.  
  65. .ytp-delhi-modern .ytp-time-display:not(.ytp-miniplayer-ui *),
  66. .ytp-delhi-modern .ytp-chapter-container {
  67. padding: var(--element-margin) 0 !important;
  68. }
  69.  
  70. /* Play button */
  71. .ytp-delhi-modern .ytp-chrome-controls .ytp-play-button {
  72. --size: var(--element-height);
  73. height: var(--size) !important;
  74. width: var(--size) !important;
  75. top: -2px;
  76. }
  77.  
  78. /* Play icon */
  79. .ytp-delhi-modern-icons .ytp-chrome-controls .ytp-play-button svg {
  80. padding: 10px !important;
  81. --size: 26px;
  82. height: var(--size) !important;
  83. width: var(--size) !important;
  84. }
  85.  
  86. /* gradient */
  87. .ytp-chrome-bottom:after {
  88. content: '';
  89. position: absolute;
  90. left: -100px;
  91. bottom: -2px;
  92. width: calc(100% + 200px);
  93. background: linear-gradient(0deg, #000a, #0000);
  94. height: calc(var(--toolbar-height) + 10px);
  95. z-index: -1;
  96. }
  97.  
  98. /* fullscreen fixes */
  99. .ytp-delhi-modern.ytp-delhi-horizontal-volume-controls.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-volume-area,
  100. .ytp-big-mode .ytp-volume-slider,
  101. .ytp-delhi-modern .ytp-chrome-controls .ytp-mute-button,
  102. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-time-display,
  103. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-chrome-controls .ytp-next-button:not(.ytp-miniplayer-button-container > *),
  104. .ytp-big-mode.ytp-delhi-modern .ytp-chrome-controls .ytp-prev-button:not(ytp-miniplayer-button-container > *),
  105. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-time-wrapper,
  106. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-chapter-title.ytp-button {
  107. height: var(--element-height) !important;
  108. min-height: var(--element-height) !important;
  109. line-height: var(--element-height) !important;
  110. margin-top: 0px !important;
  111. margin-bottom: 0px !important;
  112. --element-margin: 2px;
  113. }
  114.  
  115. .ytp-big-mode.ytp-delhi-modern-icons .ytp-chrome-controls .ytp-button svg,
  116. .ytp-delhi-modern.ytp-big-mode:not(.ytp-xsmall-width-mode) .ytp-chrome-controls .ytp-next-button:not(.ytp-miniplayer-button-container > *) svg,
  117. .ytp-big-mode.ytp-delhi-modern .ytp-chrome-controls .ytp-prev-button:not(ytp-miniplayer-button-container > *) svg {
  118. padding-top: 14px;
  119. }
  120.  
  121. .ytp-big-mode.ytp-delhi-modern.ytp-delhi-horizontal-volume-controls .ytp-volume-area .ytp-volume-icon svg {
  122. padding-top: 10px;
  123. }
  124.  
  125. /* COLORS */
  126. .ytp-delhi-modern .ytp-time-wrapper:not(.ytp-miniplayer-ui *),
  127. .ytp-delhi-modern.ytp-delhi-horizontal-volume-controls .ytp-volume-area,
  128. .ytp-delhi-modern .ytp-chrome-controls .ytp-play-button,
  129. .ytp-delhi-modern .ytp-chrome-controls .ytp-right-controls,
  130. .ytp-delhi-modern .ytp-chrome-controls > * > *,
  131. .ytp-delhi-modern .ytp-chapter-title.ytp-button {
  132. background: var(--bg-color) !important;
  133. }
  134.  
  135. /* Play and fullscreen buttons clickable in corners */
  136. .ytp-fullscreen-button {
  137. overflow: unset !important;
  138. }
  139.  
  140. .ytp-fullscreen-button::after {
  141. content: '';
  142. position: absolute;
  143. inset-block: -10px;
  144. inset-inline: 0px;
  145. width: 220px !important;
  146. height: 200px;
  147. }
  148.  
  149. /* Video endscreen fix */
  150. .ytp-fullscreen-grid-active.html5-video-player.ended-mode .ytp-modern-videowall-still:nth-child(n+4) {
  151. display: block !important; /* Show thumbnails starting from the 4th one */
  152. }
  153.  
  154. .ytp-fullscreen-grid-active.html5-video-player.ended-mode .ytp-modern-videowall-still:nth-child(n+11),
  155. .ytp-fullscreen-grid-expand-button {
  156. display: none !important; /* Hide thumbnails after the 10th one and the expand button */
  157. }
  158.  
  159. .ytp-fullscreen-grid-active.ytp-grid-scrollable .ytp-fullscreen-grid {
  160. top: 10% !important; /* Adjust grid positioning */
  161. }
  162.  
  163. .ytp-fullscreen-grid-stills-container {
  164. grid-template-columns: repeat(5, 1fr) !important; /* Use 5 columns for grid */
  165. }
  166.  
  167. ytd-app {
  168. overflow: auto !important;
  169. }
  170.  
  171. ytd-app[scrolling] {
  172. position: absolute !important;
  173. top: 0 !important;
  174. left: 0 !important;
  175. right: calc((var(--ytd-app-fullerscreen-scrollbar-width) + 1px) * -1) !important;
  176. bottom: 0 !important;
  177. overflow-x: auto !important;
  178. }
  179.  
  180. ytd-watch-flexy[full-bleed-player] #single-column-container.ytd-watch-flexy,
  181. ytd-watch-flexy[full-bleed-player] #columns.ytd-watch-flexy {
  182. display: flex !important;
  183. }
  184.  
  185. .ytp-fullscreen-grid-peeking.ytp-full-bleed-player.ytp-delhi-modern:not(.ytp-autohide) .ytp-chrome-bottom {
  186. bottom: 0 !important;
  187. opacity: 1 !important;
  188. }
  189.  
  190. #movie_player:not(.ytp-grid-ended-state) .ytp-fullscreen-grid {
  191. display: none !important;
  192. top: 100% !important;
  193. opacity: 0 !important;
  194. }
  195. `);
  196. })();
  197.  
Advertisement
Add Comment
Please, Sign In to add comment