查找并删除嵌套链

发布于 2025-02-06 05:09:55 字数 474 浏览 1 评论 0原文

我创建了一个GreaseMonKey脚本,目的是将瓷砖隐藏在表格视图中。具体来说,这些“瓷砖”(文章)是围绕A包裹的,它可以通过内部具有特定图标来识别:::

而我能够提取这些图标并与它们进行交互,我无法浏览链条并向用户隐藏这些链条,以便以下内容:

<article class="..." itemprop="listItemElement">
<a ...>
<div ...>
<div ...>
<span>
::before
</span>
</div>
</div>
</a>
</article>

每当我在之前识别::时,我都想从视图中'浏览''并用itemprop =“ listitemelement”隐藏文章。

实现这一目标的正确方法是什么?

I have created a Greasemonkey script with the purpose of hiding tiles in a tabular view. Specifically, these 'tiles' (articles) are a wrapped around a which is identified by having a specific icon inside: ::before

While I am able to extract these and interact with them, I am unable to navigate up the chain and hide these from the user such that:

<article class="..." itemprop="listItemElement">
<a ...>
<div ...>
<div ...>
<span>
::before
</span>
</div>
</div>
</a>
</article>

Any time I identify the ::before, I would like to 'navigate' upwards and hide the article with itemprop="listItemElement" from view.

What would be the correct way to achieve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文