ao3 hide certain tags

suppress tags that aren't capitalized

目前為 2016-04-10 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name ao3 hide certain tags
  3. // @namespace https://greasyfork.org/en/users/36620
  4. // @version 0.1
  5. // @description suppress tags that aren't capitalized
  6. // @author scriptfairy
  7. // @match http*://archiveofourown.org/*works*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function($) {
  12. var lis = $('.index .tags li');
  13. for (i=0;i<lis.length;i++) {
  14. var li = lis[i];
  15. var tagtext = li.innerText;
  16. if (tagtext[0] == tagtext[0].toLowerCase() == -1 && tagtext[0] !== tagtext[0].toUpperCase()) {
  17. li.style.display = 'none';
  18. }
  19. else if (tagtext.indexOf(" ") > -1 && tagtext.slice(1) == tagtext.slice(1).toLowerCase()) {
  20. li.style.display = 'none';
  21. }
  22. }
  23. })(window.jQuery);