Greasy Fork is available in English.

leetCode过滤器

try to take over the world!

Versão de: 29/05/2019. Veja: a última versão.

  1. // ==UserScript==
  2. // @name leetCode过滤器
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://leetcode-cn.com/problemset/all/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. let func = window.onload ;
  14. window.onload = ()=>{
  15. func && func();
  16. let observer = new MutationObserver((a,b)=>{
  17. Array.from(document.getElementsByTagName("tr"))
  18. .filter(item=>item.querySelectorAll("div>span>span").length>0)
  19. .forEach(item=>{item.style.display='none'});
  20. });
  21. let tb = document.querySelector(".category-group-base+div")
  22. let options = {
  23. 'childList': true,
  24. "subtree":true,
  25. } ;
  26. observer.observe(tb, options);
  27. }
  28. })();