Neocities 2014 part 3

Change the height of a specific div element on all websites

  1. // ==UserScript==
  2. // @name Neocities 2014 part 3
  3. // @namespace *
  4. // @version 1.0
  5. // @description Change the height of a specific div element on all websites
  6. // @match *://*/*
  7. // @grant none
  8. // @license MIT
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Function to change the element height
  15. function changeElementHeight() {
  16. const element = document.querySelector('div.gsc-positioningWrapper');
  17. if (element) {
  18. element.style.height = '20px';
  19. }
  20. }
  21.  
  22. // Wait for the page to load and then change the element height
  23. window.addEventListener('load', changeElementHeight);
  24. })();