Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added userscript #2

Merged
merged 6 commits into from May 28, 2021
Merged

added userscript #2

merged 6 commits into from May 28, 2021

Conversation

andreasbrett
Copy link
Contributor

To make this more user-friendly I decided to make this a userscript for Tampermonkey. It will automatically load the map below the original map. Had to make 2 slight adjustments to your original JS code and CSS styling to make it work.

for use with e.g. Tampermonkey
@cahz
Copy link
Owner

cahz commented May 28, 2021

Thanks for the contribution!

I don't have much experience with userscripts. Do you maybe have a suggestion to get rid of the code duplication?

@andreasbrett
Copy link
Contributor Author

Thanks for the contribution!

I don't have much experience with userscripts. Do you maybe have a suggestion to get rid of the code duplication?

This should work nicely. The view.js is fetched from Github and executed. I needed to load it as text as Github does have CORB protection in place and files can't be sideloaded to websites directly... If you decide to merge this PR to your repo, change the static URL in the userscript as it currently points to view.js from my fork (with those tiny changes to make it integrate in the already rendered Komoot page).

@cahz
Copy link
Owner

cahz commented May 28, 2021

Good solution, thank you 👍

@cahz cahz merged commit 4b4b9f3 into cahz:master May 28, 2021
@WuerfelDev
Copy link
Contributor

Would be cool to mention the tampermonkey script in the README. I almost created one myself ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants