Greasy Fork is available in English.

Imgur: Mobile Cleanup

Cleanup m.imgur.com and always load all images in the album.

  1. // ==UserScript==
  2. // @name Imgur: Mobile Cleanup
  3. // @namespace https://github.com/Zren/
  4. // @description Cleanup m.imgur.com and always load all images in the album.
  5. // @icon https://imgur.com/favicon.ico
  6. // @author Zren
  7. // @version 1
  8. // @include https://m.imgur.com/*
  9. // @grant GM_addStyle
  10. // ==/UserScript==
  11.  
  12. var css = ".FloatingOIA-container { display: none; }";
  13. css += ".PostLoader { display: none; }";
  14. css += ".AppBanner { display: none; }";
  15. css += ".Navbar .getTheApp { display: none; }";
  16.  
  17. if (window.location.pathname.startsWith('/gallery/')) {
  18. css += ".GalleryHandler-postContainer { display: none; }";
  19. css += ".GalleryInfiniteScroll > div > div:not(.GalleryHandler-postContainer) + .GalleryHandler-postContainer { display: block !important; }";
  20. css += '.GalleryInfiniteScroll > div > div:not(.GalleryHandler-postContainer)[style="width: 100%; height: 9000px;"] { display: none; }';
  21. }
  22. GM_addStyle(css);
  23.  
  24. function tick() {
  25. var loadMoreButton = document.querySelector('.Post-albumSeeMore.Button');
  26. if (loadMoreButton) {
  27. loadMoreButton.click();
  28. } else {
  29. setTimeout(tick, 400);
  30. }
  31. }
  32.  
  33. setTimeout(tick, 400);