E-H GIF Filter

Find which pages of a gallery are animated.

Od 25.01.2019.. Pogledajte najnovija verzija.

  1. // ==UserScript==
  2. // @name E-H GIF Filter
  3. // @description Find which pages of a gallery are animated.
  4. // @author Hen-Tie
  5. // @homepage https://hen-tie.tumblr.com/
  6. // @namespace https://greasyfork.org/en/users/8336
  7. // @include /https?:\/\/(e-|ex)hentai\.org\/g\/.*/
  8. // @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js
  9. // @icon https://i.imgur.com/pMMVGRx.png
  10. // @version 1.0
  11. // ==/UserScript==
  12.  
  13. /*───────────────┬────────────────┐
  14. │ Action │ Value │
  15. ├────────────────┼────────────────┤
  16. │ Highlight GIFs │ filterMode = 0 │
  17. │ Only show GIFs │ filterMode = 1 │
  18. └────────────────┴───────────────*/
  19. var filterMode = 0;
  20.  
  21. if ($('.gdtl img[title$=".gif"]').length) {
  22. var notGif = $('.gdtl img:not([title$=".gif"])');
  23. $('#gdt').prepend('<em id="gif-filter" style="display:block; padding:3px; width:100%; text-align:center;">E-H GIF Filter is active</em>');
  24. if (filterMode) {
  25. notGif.closest('.gdtl').hide();
  26. $('#gif-filter').append('—' + notGif.length + ' hidden');
  27. } else {
  28. notGif.css('opacity','.33');
  29. }
  30. }