Filter out Transmorpher DDS

Automatically removes the artist "Transmorpher DDS" from searches.

  1. // ==UserScript==
  2. // @name Filter out Transmorpher DDS
  3. // @namespace dragontamer8740
  4. // @description Automatically removes the artist "Transmorpher DDS" from searches.
  5. // @version 1.1
  6. // @include http://g.e-hentai.org/*
  7. // @include http://e-hentai.org/*
  8. // @include http://exhentai.org/*
  9. // @include https://g.e-hentai.org/*
  10. // @include https://e-hentai.org/*
  11. // @include https://exhentai.org/*
  12. // @match http://g.e-hentai.org/*
  13. // @match http://e-hentai.org/*
  14. // @match http://exhentai.org/*
  15. // @match https://g.e-hentai.org/*
  16. // @match https://e-hentai.org/*
  17. // @match https://exhentai.org/*
  18. // ==/UserScript==
  19. if(document.querySelector('input[name="f_search"]')) // only if search bar exists on current page
  20. {
  21. //puts '-artist:"transmorpher DDS"' in the search field.
  22. if( document.querySelector('input[name="f_search"]').value=="")
  23. {
  24. document.querySelector('input[name="f_search"]').value +="-artist:\"transmorpher DDS\" ";
  25. }
  26. //if it's already in the search field (case insensitive), don't do anything. Otherwise, add it to the end.
  27. else if( !(document.querySelector('input[name="f_search"]').value.toUpperCase().includes("-artist:\"transmorpher DDS\"".toUpperCase())) )
  28. {
  29. document.querySelector('input[name="f_search"]').value +=" -artist:\"transmorpher DDS\" ";
  30. }
  31. }