Pixiv User Scanner (Queue + Highlight + Follow/Unfollow Detect)

Scan Pixiv users lazily, highlight follow status, detect follow & unfollow actions

目前為 2025-05-13 提交的版本,檢視 最新版本

作者
Oppai1442
評價
0 0 0
版本
1.5
建立日期
2025-05-13
更新日期
2025-05-13
尺寸
5.2 KB
授權條款
CC BY-NC-ND 4.0
腳本執行於

Pixiv User Scanner (Queue + Highlight + Follow/Unfollow Detect)

A user script for enhancing Pixiv user visibility by scanning user links, checking follow status, and detecting follow/unfollow actions.

📌 Features

  • Queue-based Scanning: Lazily scans Pixiv user links found on the page.
  • Follow Status Highlighting: Adds a green border to users you follow.
  • Follow/Unfollow Detection: Detects and visually updates when you follow or unfollow a user.
  • Auto Sync: Syncs user status with Pixiv server after manual follow/unfollow.

⚙️ How it Works

  1. The script detects Pixiv user links on the page (/users/:id).
  2. For each unprocessed user, it fetches their follow status using the Pixiv AJAX API.
  3. It then highlights followed users by adding a green border to their user card.
  4. When you follow/unfollow someone, it updates immediately and re-validates after 3 seconds.

💡 Technical Details

  • Uses a processing queue to avoid rate-limiting.
  • Applies DOM mutation observer to re-scan when new content is added (e.g., infinite scroll).
  • All fetches are done with credentials: include to preserve login state.
  • Automatically applies styling without modifying Pixiv's base UI significantly.

🧠 Structure

  • scanned: Set to track already scanned user IDs
  • processed: Map of userId → isFollowed (true/false)
  • queue: Array of userIds to process sequentially

🔍 Visual Example

Followed users will have a green outline:

+--------------------------+
| [Profile Image]         |
| Username                |
| +--------------------+  |
| |     [✓ Followed]   |  | ← Green Border
| +--------------------+  |
+--------------------------+

🧑‍💻 Author

  • Script Name: Pixiv User Scanner
  • Namespace: Violentmonkey Scripts
  • Version: 1.5
  • Author: Oppai1442

📝 Installation

Install it via Violentmonkey or Tampermonkey by creating a new script and pasting the full code.

Match URL: https://www.pixiv.net/*