Hide Unsplash+ Content

Hide Unsplash+ photos and related mentions on unsplash.com

作者
kosherkale
今日安裝
1
安裝總數
2
評價
1 0 0
版本
1.3
建立日期
2025-02-08
更新日期
2025-02-23
尺寸
3.4 KB
授權條款
MIT
腳本執行於

Enhanced Hide Unsplash+ Content

A userscript that removes all Unsplash+ content from unsplash.com, including premium photos, promotional banners, and subscription mentions. This script helps users focus on freely available content by hiding paywalled images and related promotional material.

Features

  • Hides all Unsplash+ photos from the photo grid
  • Removes Unsplash+ promotional banners and popups
  • Hides premium content indicators and download buttons
  • Works on both homepage and search results
  • Continues functioning while scrolling (handles dynamically loaded content)
  • Maintains site functionality for free content

Installation

  1. First, install a userscript manager:

  2. Install the script (GitHub):

    • Click on your userscript manager's icon
    • Select "Create new script" or "Add new script"
    • Copy and paste the entire script code
    • Save the script (usually Ctrl+S or Command+S)
  3. Install the script (GreasyFork):

    • Click on Install this script

How It Works

The script uses several methods to identify and hide Unsplash+ content:

  1. Selector-based Detection: Identifies premium content through HTML attributes and classes
  2. Icon Detection: Looks for plus icons and lock symbols
  3. URL Pattern Matching: Catches links containing "/plus" references
  4. Dynamic Content Handling: Uses MutationObserver to catch newly loaded content
  5. Container Removal: Hides both the premium elements and their containing elements

Customization

The script uses a selectors object that contains two main categories:

const selectors = {
    promoContent: [...],  // Promotional content selectors
    photoContent: [...]   // Photo-related content selectors
};