Created
February 20, 2024 08:12
-
-
Save Inndy/800bef2180c841403497f354fd0d900a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function searchTag(el, tag) { | |
return el.tagName === tag ? el : searchTag(el.parentNode, tag); | |
} | |
const blockList = /acer|kioxia|pny/ig | |
const requireList = /[124]tb/ig | |
[...$$('#ItemContainer .prod_name')] | |
.filter(el => el.textContent.match(blockList) || !el.textContent.match(requireList)) | |
.map(el => searchTag(el, 'DL')) | |
.forEach(el => el.remove()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment