Google neocities 2014 part 5

Change the margin of elements with the class 'gsc-tabHeader' on websites containing a specific URL

  1. // ==UserScript==
  2. // @name Google neocities 2014 part 5
  3. // @namespace https://vanced-youtube.neocities.org/2013/
  4. // @version 1.0
  5. // @description Change the margin of elements with the class 'gsc-tabHeader' on websites containing a specific URL
  6. // @match *://*/*
  7. // @grant none
  8. // @license MIT
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Function to change the tabHeader margin
  15. function changeTabHeaderMargin() {
  16. const tabHeaders = document.querySelectorAll('div.gsc-tabHeader');
  17. tabHeaders.forEach((tabHeader) => {
  18. tabHeader.style.margin = '-16px 8px';
  19. });
  20. }
  21.  
  22. // Check if the current URL contains the target URL
  23. if (window.location.href.includes('https://vanced-youtube.neocities.org/2013/')) {
  24. // Wait for the page to load and then change the tabHeader margin
  25. window.addEventListener('load', changeTabHeaderMargin);
  26. }
  27. })();