YouTube Header Styler

Change YouTube header style to white and add a shadow

  1. // ==UserScript==
  2. // @name YouTube Header Styler
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Change YouTube header style to white and add a shadow
  6. // @author Your Name
  7. // @match https://www.youtube.com/*
  8. // @grant GM_addStyle
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Add CSS to style the header and background
  15. GM_addStyle(`
  16. #header {
  17. background-color: white !important; /* White background for the header */
  18. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Shadow under the header */
  19. position: relative; /* Make sure the shadow is visible */
  20. z-index: 10; /* Ensure the header is above other elements */
  21. }
  22.  
  23. /* Light gray background for the rest of the page */
  24. body {
  25. background-color: #f5f5f5 !important; /* Light gray background */
  26. }
  27.  
  28. /* Ensure that the main content area is not covered */
  29. #content {
  30. margin-top: 56px; /* Adjust this value based on the header height */
  31. }
  32. `);
  33. })();