Google Height Changer

Changes the height to 50px in the category .form-cont on the node <div class="noticebar"><div class="nbpr"></div></div>

  1. // ==UserScript==
  2. // @name Google Height Changer
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Changes the height to 50px in the category .form-cont on the node <div class="noticebar"><div class="nbpr"></div></div>
  6. // @author You
  7. // @match https://vanced-youtube.neocities.org/2013/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. // Function to set the desired height of the target element
  14. function setElementHeight() {
  15. const targetNode = document.querySelector('div.noticebar > div.nbpr.form-cont');
  16. if (targetNode) {
  17. targetNode.style.height = '50px';
  18. }
  19. }
  20. // Call the function to set the height when the DOM is ready
  21. document.addEventListener('DOMContentLoaded', setElementHeight);
  22. })();