Auto Fix Hidden Content and Remove All Signup Prompts from Daily Mail

Automatically remove max-height, overflow hidden, and remove subscription pop-ups

  1. // ==UserScript==
  2. // @name Auto Fix Hidden Content and Remove All Signup Prompts from Daily Mail
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.4
  5. // @description Automatically remove max-height, overflow hidden, and remove subscription pop-ups
  6. // @author Simpson
  7. // @match *://*/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. window.addEventListener('load', function() {
  16. // Fix hidden content
  17. document.querySelectorAll('[itemprop="articleBody"]').forEach(function(element) {
  18. element.style.maxHeight = 'none';
  19. element.style.overflow = 'visible';
  20. });
  21.  
  22. // Remove subscription popup and the top strip text
  23. let signupPrompt = document.querySelector('.signUpInner-D8IiK');
  24. if (signupPrompt) {
  25. signupPrompt.remove();
  26. }
  27.  
  28. let signupTopStrip = document.querySelector('.signUpTopStripText-19DC9c');
  29. if (signupTopStrip) {
  30. signupTopStrip.remove();
  31. }
  32. });
  33. })();