Fab 隐藏已保存项目

优化性能,隐藏“已保存在我的库中/Saved in My Library”项目并添加控制按钮与计数器,UI跟随网页语言

As of 2025-07-01. See the latest version.

نووسەر
run king
Ratings
0 0 0
وەشان
1.9
Created
2025-07-01
Updated
2025-07-01
Size
5 KB
مۆڵەت
نییە
Applies to

---

## 🚀 Fab Hide Saved Items

### 📝 **Description**

"Fab Hide Saved Items" is a user script designed for Fab.com. It intelligently hides resource cards that you have already "Saved to My Library" (or Chinese "已保存在我的库中"), helping you to:

* **Reduce visual clutter:** Easily filter out items you already own or have saved.
* **Improve Browse efficiency:** Focus on new, unexplored content.
* **Enjoy smart multi-language UI:** The script's action button automatically adapts to the webpage's language (English or Chinese) for a seamless experience.

### ✨ **Key Features**

* **Auto-hide Saved Items:** Automatically identifies and hides project cards marked with "Saved to My Library" or "已保存在我的库中" on Fab.com's channel, discover, and search results pages.
* **Visual Counter:** The action button displays a real-time count of hidden items on the current page.
* **One-click Toggle:** A convenient floating button in the top-right corner allows you to easily switch between showing and hiding saved items.
* **Smart Multi-Language UI:** The button text (e.g., "🙈 Hide Saved Items" / "👀 Show Saved Items" or their Chinese equivalents) automatically switches based on the language of the Fab.com page you are currently viewing.
* **Lightweight & Efficient:** The script is optimized for performance with debounce handling, ensuring no lag even with dynamically loaded content.

### 🌐 **Supported Pages**

To ensure optimal performance, this script is active only on the following Fab.com page types:

* **Channel Pages:** `https://www.fab.com/channels/*` (including `/zh-cn/` paths)
* **"Discover" Pages:** `https://www.fab.com/discover*` (including `/zh-cn/` paths)
* **Search Results Pages:** `https://www.fab.com/search*` (including `/zh-cn/` paths)

### 🚀 **How to Install and Use?**

This script requires a browser extension called a **user script manager** (e.g., **Tampermonkey** or **Violentmonkey**).

1. **Install a User Script Manager:**
* If you don't have one, visit your browser's extension store to install **Tampermonkey** (recommended):
* [For Chrome/Edge users](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo)
* [For Firefox users](https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/)
2. **Install This Script:**
* On this Greasy Fork page, click the "**Install**" button (usually a large green button).
* Your user script manager will open a confirmation screen.
* Click "**Install**" or "**Confirm**" within the manager's interface to complete the script installation.
3. **Start Using!**
* Once installed, open your browser and navigate to any supported page on Fab.com (e.g., `https://www.fab.com/channels/unreal-engine`).
* After the page loads, you will see a **floating button with a blue background** in the **top-right corner**.
* If the page is in English, the button will show "🙈 **Hide Saved Items (X)**".
* If the page is in Chinese, it will show "🙈 **隐藏已保存项目 (X)**".
* `X` represents the number of hidden items on the page.
* Click this button to easily toggle the visibility of your saved items!

### ⚠️ **Important Notes**

* **Website Structure Changes:** Fab.com's HTML structure may be updated over time. If the script suddenly stops working, it might be due to changes in the website's elements, requiring an update to the script's code.
* **Language Detection:** While the script strives for intelligent language detection based on the webpage's settings, in rare cases (e.g., unusual page loading, non-standard language identifiers), the button's language might not perfectly match the page's language. A page refresh or clearing browser cache/cookies might help.
* **Saved Text Changes:** If Fab.com changes the exact wording of "Saved to My Library" or "已保存在我的库中", the script will no longer be able to identify those items and will require an update to the `savedTextSet` variable.

---