🏠 返回首頁 

Greasy Fork is available in English.

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://greasyfork.org/users/779030
  8. // ==/UserScript==
  9. (function() {
  10. 'use strict';
  11. // Create a <style> element
  12. const style = document.createElement('style');
  13. style.type = 'text/css';
  14. style.textContent = `
  15. @media (min-width: 936px) {
  16. #main-panel.ytmusic-player-page {
  17. flex: unset;
  18. }
  19. }
  20. content.style-scope.ytmusic-player-page {
  21. flex: unset;
  22. }
  23. ytmusic-player-page:not([is-mweb-modernization-enabled]):not([has-av-switcher]) #main-panel.ytmusic-player-page {
  24. display: block;
  25. }
  26. .side-panel.ytmusic-player-page {
  27. flex: unset;
  28. margin: -40px -0px 0px !important;
  29. width: 80vw !important;
  30. max-width: unset;
  31. }
  32. .non-expandable.ytmusic-description-shelf-renderer {
  33. text-align: center;
  34. font-size: 20px;
  35. }
  36. .ytmusic-player {
  37. display: block !important;
  38. }
  39. `;
  40. // Append the <style> element to the document head
  41. document.head.appendChild(style);
  42. })();