YouTube MUSIC

This script uses CSS to get rid of the video player and frees the visual space to be occupied by the playlist. It also increases the font of the song lyrics and puts it at the center of the tab.

  1. // ==UserScript==
  2. // @name YouTube MUSIC
  3. // @version 1.1
  4. // @description This script uses CSS to get rid of the video player and frees the visual space to be occupied by the playlist. It also increases the font of the song lyrics and puts it at the center of the tab.
  5. // @match *://music.youtube.com/*
  6. // @grant none
  7. // @namespace https://gf.qytechs.cn/users/779030
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. // Create a <style> element
  14. const style = document.createElement('style');
  15. style.type = 'text/css';
  16. style.textContent = `
  17. @media (min-width: 936px) {
  18. #main-panel.ytmusic-player-page {
  19. flex: unset;
  20. }
  21. }
  22. content.style-scope.ytmusic-player-page {
  23. flex: unset;
  24. }
  25. ytmusic-player-page:not([is-mweb-modernization-enabled]):not([has-av-switcher]) #main-panel.ytmusic-player-page {
  26. display: block;
  27. }
  28. .side-panel.ytmusic-player-page {
  29. flex: unset;
  30. margin: -40px -0px 0px !important;
  31. width: 80vw !important;
  32. max-width: unset;
  33. }
  34. .non-expandable.ytmusic-description-shelf-renderer {
  35. text-align: center;
  36. font-size: 20px;
  37. }
  38. .ytmusic-player {
  39. display: block !important;
  40. }
  41. `;
  42.  
  43. // Append the <style> element to the document head
  44. document.head.appendChild(style);
  45. })();

QingJ © 2025

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