Firefox 浏览器附加组件
  • 扩展
  • 主题
    • 适用于 Firefox
    • 字典和语言包
    • 其他浏览器网站
    • 适用于 Android 的附加组件
登录
Discover Less 预览

Discover Less 作者: Matheus Araujo

A simple extension that hides the 'Discover More' on Twitter and 'mute/block' messages

0 (0 reviews)0 (0 reviews)
1 个用户1 个用户
您需要 Firefox 来使用此扩展
下载 Firefox 并安装扩展
下载文件

扩展元数据

关于此扩展
Extension for reducing distractions on X 🐦

I created a simple Chrome extension to avoid distractions with "Discover More" on X. For those who have difficulty keeping their focus, like me, it disturbs them so much.

The extension occults the "Discover More" function, improving the browsing experience.
开发者留言
How it Works
  1. The script defines an array called blockedWords containing phrases used for filtering.
  2. The removeDiscoverMore function performs the core removal logic:
    • It selects all elements with the data-testid="cellInnerDiv" attribute.
    • Iterates through these elements in reverse order for proper removal.
    • For each element, it checks the heading text for any blocked word.
    • If a blocked word is found, the function removes the current element and all its following siblings with the same test ID.
  3. The removeElements function is a helper function used to remove elements efficiently:
    • It finds the index of the element within its parent node.
    • It hides all following siblings using display: none instead of complete removal to avoid triggering Twitter's re-rendering.
  4. The script calls removeDiscoverMore initially to remove existing elements.
  5. Finally, a MutationObserver is created to monitor the DOM for changes. Whenever the DOM structure changes (e.g., new elements are added), the removeDiscoverMore function is re-executed to remove any newly added elements containing blocked phrases.
评分 0(1 位用户)
登录以评价此扩展
目前尚无评分

已保存星级评分

5
0
4
0
3
0
2
0
1
0
尚无评价
权限与数据详细了解

必要权限:

  • 访问您在 twitter.com 的数据
更多信息
附加组件链接
  • 主页
  • 用户支持网站
  • 支持邮箱
版本
1.0.0
大小
42.34 KB
上次更新
1 年前 (2024年4月3日)
相关分类
  • 隐私和安全
  • 社交和通信
许可证
Apache License 2.0
版本历史
  • 查看所有版本
标签
  • content blocker
  • social media
  • twitter
添加到收藏集
举报此附加组件
Matheus Araujo 制作的更多扩展
  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

转至 Mozilla 主页

附加组件

  • 关于
  • Firefox 附加组件博客
  • 扩展工坊
  • 开发者中心
  • 开发者政策
  • 社区博客
  • 论坛
  • 报告缺陷
  • 评价指南

浏览器

  • Desktop
  • Mobile
  • Enterprise

产品

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • 隐私
  • Cookie
  • 法律

除非另有注明,否则本网站上的内容可按知识共享 署名-相同方式共享 3.0 或更新版本使用。