Last active
June 29, 2025 15:31
-
-
Save praszuk/ed5ead5923d089f92d1648b48801ca18 to your computer and use it in GitHub Desktop.
Add OSM quick actions (Achavi, OSMCha) below change set id.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name OSM-website actions | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.1.1 | |
| // @description Add few quick actions below changeset id | |
| // @author praszuk | |
| // @match https://www.openstreetmap.org/changeset* | |
| // @icon https://www.openstreetmap.org/favicon.ico | |
| // @grant none | |
| // @run-at document-idle | |
| // @downloadURL https://gist.githubusercontent.com/praszuk/ed5ead5923d089f92d1648b48801ca18/raw/osm-website-quick-actions.user.js | |
| // @updateURL https://gist.githubusercontent.com/praszuk/ed5ead5923d089f92d1648b48801ca18/raw/osm-website-quick-actions.user.js | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| const extensionSectionElement = document.querySelectorAll('#sidebar_content > div')[0]; | |
| const changesetId = window.location.pathname.split('/')[2]; | |
| const achaviURL = `https://nrenner.github.io/achavi/?changeset=${changesetId}`; | |
| const osmchaURL = `https://osmcha.org/changesets/${changesetId}`; | |
| const josmReverterURL = `http://localhost:8111/revert_changeset?id=${changesetId}`; | |
| extensionSectionElement.insertAdjacentHTML( | |
| 'afterBegin', | |
| `<p class="quick-actions"> | |
| <a href="${achaviURL}" target="_blank">[Achavi]</a> | |
| <a href="${osmchaURL}" target="_blank">[OSMCha]</a> | |
| <a href="${josmReverterURL}" target="_blank">[JOSM Revert]</a> | |
| </p>` | |
| ); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment