Files

20 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

# Bluemap Simple Hidder
JavaScript snippet to hide and show the player-icon container in BlueMap's web viewer. On load it hides the container and exposes global helpers to toggle visibility.
## How it works
- Uses the CSS selector `#map-container > div > div:nth-child(2)` to find the container that renders player icons.
- Hides the container as soon as the script runs.
- Exposes two global functions: `close_sesame` to hide and `open_sesame` to show the icon container.
## Quick start
1. Open your BlueMap web instance.
2. Inject `PlayerHidder.js` into the page (for example, as an extra script in BlueMap's web folder or by pasting the code into the browser console with the map open).
3. Player markers will hide automatically. Run `close_sesame()` or `open_sesame()` in the console to toggle visibility.
## Customizing
- If your DOM differs, adjust the `selector` value in `PlayerHidder.js` to target the correct container.
## License
- This project is licensed under the GNU General Public License v3.0. See `LICENSE` for details.