loveshdongre / leetcode-enhancer

A cross-browser extension to improve productivity on Leetcode
https://chrome.google.com/webstore/detail/leetcode-enhancer/gcmncppaaebldbkgkcbojghpmpjkdlmp
45 stars 5 forks source link

`Hide Solved Problem` not hiding all the problems #5

Closed PROxZIMA closed 3 years ago

PROxZIMA commented 3 years ago

So LeetCode introduced daily challenges and after solving it, it's still there in the problem list. Daily solved challenges have different SVG. Take a look here

Screenshot from 2021-10-26 20-25-13

And the other SVG is this

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" class="...">
  <path fill-rule="evenodd" d="M20 12.005v-.828a1 1 0 112 0v.829a10 10 0 11-5.93-9.14 1 1 0 01-.814 1.826A8 8 0 1020 12.005zM8.593 10.852a1 1 0 011.414 0L12 12.844l8.293-8.3a1 1 0 011.415 1.413l-9 9.009a1 1 0 01-1.415 0l-2.7-2.7a1 1 0 010-1.414z" clip-rule="evenodd"></path>
</svg>

The issue is the SVG selector you implemented https://github.com/loveshdongre/leetcode-enhancer/blob/d2842ce794f65a37d674170bc54135a7013876ad/content-script.js#L391-L405

The selector matches only one type of SVG. So it can be fixed by adding an or condition to above 2 if statements which matches the 2nd SVG as well.

I've created a PR #6 . Review it and let me know. Thanks

loveshdongre commented 3 years ago

Thanks @PROxZIMA for adding this case!