dayuploads.com - Remove Ad Link Button

Removes the button with id="ad-link"

  1. // ==UserScript==
  2. // @name dayuploads.com - Remove Ad Link Button
  3. // @namespace https://greasyfork.org/en/users/807108-jeremy-r
  4. // @version 1
  5. // @description Removes the button with id="ad-link"
  6. // @icon https://www.google.com/s2/favicons?sz=64&domain=dayuploads.com
  7. // @author JRem
  8. // @match https://dayuploads.com/*/file
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Remove button with id="ad-link"
  17. const adLinkButton = document.getElementById('ad-link');
  18. if (adLinkButton) {
  19. adLinkButton.parentNode.removeChild(adLinkButton);
  20. }
  21.  
  22. // Modify button with id="ad-link2"
  23. const adLink2Button = document.getElementById('ad-link2');
  24. if (adLink2Button) {
  25. const currentText = adLink2Button.textContent || adLink2Button.innerText; // Get current text content
  26. adLink2Button.textContent = "[Cleaned] " + currentText; // Prepend the text
  27. adLink2Button.classList.remove('hidden');
  28. }
  29. })();