Change Search Form Height

Change the height of a specific div element on websites containing a specific URL

  1. // ==UserScript==
  2. // @name Change Search Form Height
  3. // @namespace https://vanced-youtube.neocities.org/2013/
  4. // @version 1.0
  5. // @description Change the height of a specific div element on websites containing a specific URL
  6. // @match *://*/*
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. // Function to change the search form height
  14. function changeSearchFormHeight() {
  15. const searchForm = document.querySelector('div.jhp.big');
  16. if (searchForm) {
  17. searchForm.style.height = '20px';
  18. }
  19. }
  20.  
  21. // Check if the current URL contains the target URL
  22. if (window.location.href.includes('https://vanced-youtube.neocities.org/2013')) {
  23. // Wait for the page to load and then change the search form height
  24. window.addEventListener('load', changeSearchFormHeight);
  25. }
  26. })();