MLTSHP Image Saver

Adds download buttons to save MLTSHP images with their post titles as filenames

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

Autor
Dan Cutts
Denně instalací
0
Celkem instalací
6
Hodnocení
0 0 0
Verze
0.2
Vytvořeno
22. 04. 2025
Aktualizováno
16. 07. 2025
Size
42,6 KB
Licence
MIT
Spustit na

# 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.

![MLTSHP Image Saver Screenshot](https://i.imgur.com/example.png) *(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!