TamperMonkey Extension to Track Visited Markers on the Map
This extension is designed for the map of Kingdom Come: Deliverance but can be easily adapted to any Leaflet map, as the marker handling logic is universal.
This is a stream-of-consciousness level version, so feel free to submit pull requests for refactoring and code improvements.
- Checkboxes in the sidebar are not fully synchronized. This doesn't affect the overall functionality, and fixing it was left for later (because, honestly, I didn’t feel like dealing with it).
This project is licensed under a custom license.
- You are free to use, modify, and distribute the code as long as proper attribution is provided.
- Commercial use is strictly prohibited without explicit written permission from the author.
- For commercial licensing inquiries, please contact: frost.by@gmail.com.
If you find this project useful, consider supporting me on Buy Me a Coffee.
- Allow Tampermonkey's access to local file URIs tampermonkey/faq
- install deps with
npm iornpm ci. npm run devto start your development.
Now you will see 2 files in ./dist/
dist/index.dev.user.js: You should install this userscript in your browser. It's a simple loader that loaddist/index.debug.json matched web page.dist/index.debug.js: This is the development build witheval-source-map. It will be automatically loaded bydist/index.dev.user.jsvia@require file://.../dist/index.debug.jsmetadata, Don't add it to your userscript manager.
- edit src/index.ts, you can even import css or less files. You can use scss if you like.
- go wo https://www.example.com/ and open console, you'll see it's working.
livereload is default enabled, use this Chrome extension
Everytime you change your metadata config,
you'll have to restart webpack server and install newly generated dist/index.dev.user.js UserScript in your browser again.
like original UserScript way, you will need to add them to your user script metadata's require section , and exclude them in config/webpack.config.base.cjs
just install packages with npm and import them in your code, webpack will take care them.
npm run builddist/index.prod.user.js is the final script. you can manually copy it to greasyfork for deploy.