Twitter: Highlight Posts with Links

Highlights Tweets which contain external Links or hides Tweets without them

Ekde 2025/07/10. Vidu La ĝisdata versio.

Aŭtoro
schubsijan
Ratings
0 0 0
Versio
0.1
Kreita
2025/07/10
Ĝisdatigita
2025/07/10
Size
3,45 kb
Licenco
MIT
Aplikiĝas al

Twitter: Highlight Posts with Links

Description

This userscript enhances your Twitter browsing experience by automatically detecting posts that contain external links and providing visual feedback. It helps you quickly identify posts with valuable external content while optionally filtering out posts without links.

Features

Link Detection

The script intelligently identifies posts containing external links through multiple methods:

  • Clickable links: Detects standard hyperlinks with target="_blank" attributes
  • Text-based URLs: Recognizes URLs written as plain text in quoted tweets
  • Embedded post links: Finds links within quoted/embedded posts
  • Smart filtering: Excludes internal Twitter links (x.com) from detection

Visual Highlighting

Posts containing external links are highlighted with a distinctive blue outline, making them instantly recognizable as you scroll through your feed.

Post Filtering

Optionally hide posts that don't contain external links. Hidden posts are collapsed using CSS visibility techniques that preserve the page layout and scroll behavior.

How to Use

Installation

  1. Install the script by clicking the button with a userscript manager like Tampermonkey or Greasemonkey
  2. Navigate to Twitter - the script will automatically start working ### Recommended Companion Script For an even better Twitter experience, consider using this script together with Twitter: expand tweets automatically - it automatically expands truncated tweets so you can immediately see the full content of highlighted posts without having to click "Show more" buttons. This combination ensures that links hidden in truncated content are properly detected and highlighted, giving you complete link discovery across all tweet content. ### Settings Access settings through your userscript manager's menu (typically accessible via the browser extension icon):
  3. Highlighting: On/Off - Toggle the blue outline highlighting for posts with links
  4. Hide Posts without Links: On/Off - Toggle hiding of posts that don't contain external links Settings are automatically saved and persist between browser sessions. ## Where It Works The script is active on these Twitter pages:
  5. Home feed (x.com/)
  6. Search results (x.com/search?q=...)
  7. Profile pages (x.com/username) ## Why It's Useful
  8. Information Discovery: Quickly spot posts with external articles, resources, or references
  9. Content Filtering: Focus on posts that link to external content if that's your primary interest
  10. Improved Browsing: Reduce visual clutter by hiding posts without links when desired
  11. Time Saving: No need to read through every post to find ones with valuable external links ## Technical Details
  12. Non-intrusive: Preserves original page functionality and layout
  13. Regex-based: Employs sophisticated URL detection patterns
  14. Layout-friendly: Hidden posts use CSS visibility instead of display:none to maintain scroll behavior ## Compatibility
  15. Works with Tampermonkey, Greasemonkey, and other userscript managers
  16. Automatically adapts to Twitter's dynamic content loading
长期地址
遇到问题?请前往 GitHub 提 Issues。