您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds download buttons to save MLTSHP images with their post titles as filenames
# MLTSHP Image Saver
A Tampermonkey script that adds download buttons to images on [MLTSHP](https://mltshp.com), allowing you to save images with their post titles as filenames.
 *(Replace with actual screenshot)*
## Features
- **Smart Title Detection**: Automatically identifies and uses post titles as filenames when saving images
- **Integration with MLTSHP UI**: Adds download buttons alongside existing MLTSHP "Save" buttons
- **Fallback Positioning**: Places buttons directly on images when standard UI buttons aren't available
- **Smart Image Filtering**: Ignores logos, small icons, and non-MLTSHP images
- **Automatic Operation**: Works immediately after installation with no configuration needed
- **Floating Control Button**: Includes a force-add button for edge cases
- **Toggle On/Off**: Easily disable or enable the script via the Tampermonkey menu
- **Selective Operation**: Does not run on direct CDN image pages (https://mltshp-cdn.com/r/*)
## Installation
1. Install the [Tampermonkey](https://www.tampermonkey.net/) extension for your browser:
- [Chrome](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo)
- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/)
- [Edge](https://microsoftedge.microsoft.com/addons/detail/tampermonkey/iikmkjmpaadaobahmlepeloendndfphd)
- [Safari](https://apps.apple.com/app/tampermonkey/id1482490089)
2. Install the MLTSHP Image Saver script:
- Click [here](https://github.com/yourusername/mltshp-image-saver/raw/main/mltshp-image-saver.user.js) to install directly
- Or copy the script contents and create a new script in Tampermonkey dashboard
## How It Works
The script works by:
1. **Mapping Images to Titles**: The script scans the page and maps each image to its most relevant title based on proximity and context
2. **Adding Download Buttons**: It adds a green "Download" button for each image, either:
- Next to the MLTSHP "Save" button when available
- Directly on the image when no standard save button is found
3. **Smart Downloading**: When clicked, it downloads the image using the mapped title as the filename
## Usage
Once installed, the script runs automatically on MLTSHP pages (excluding direct CDN image URLs):
- **Download an Image**: Click the green "Download" button next to any image to save it with its title as the filename
- **Force Add Buttons**: If buttons don't appear, click the orange "Force Add Buttons" in the top-right corner
- **Toggle the Script**: Use the Tampermonkey menu to enable/disable the script temporarily
## Troubleshooting
- **No buttons appear**: Click the "Force Add Buttons" control in the top-right corner
- **Script conflicts with other extensions**: Try disabling other userscripts temporarily
- **Images download without proper titles**: The script might not be able to detect the title; try clicking the image to view it on its own page
- **Not working on direct image pages**: The script intentionally doesn't run on direct CDN image URLs (https://mltshp-cdn.com/r/*) as these pages don't have titles to extract
## Customization
You can edit the script to:
- Change button colors and appearance
- Adjust button positioning
- Toggle debug mode (set `DEBUG = true` for detailed console logging)
- Modify image filtering rules
- Change which pages the script runs on by editing the @match and @exclude rules
## Privacy & Permissions
This script:
- Only runs on MLTSHP domains (excluding direct CDN image pages)
- Does not collect or transmit any data
- Only downloads images you explicitly click on
- Operates entirely within your browser
## License
MIT License - Feel free to modify and share!
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址