Last active
August 1, 2021 03:38
-
-
Save joshinils/a5fa735b0bc11933bdac8ac08be19de9 to your computer and use it in GitHub Desktop.
osm add deep history greasemonkey
This file contains 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 Deep History osm.org | |
// @version 1 | |
// @grant none | |
// @match https://www.openstreetmap.org/node/* | |
// @match https://www.openstreetmap.org/way/* | |
// @match https://www.openstreetmap.org/relation/* | |
// ==/UserScript== | |
var sidebar_content, newElement; | |
sidebar_content = document.getElementById('sidebar_content').getElementsByClassName("browse-section")[0]; | |
if (sidebar_content) { | |
displayContainer = document.createElement('div'); | |
displayContainer.style.border = "1px solid #CCC"; | |
displayContainer.style.borderRadius = "3px"; | |
anchor = document.createElement('a'); | |
anchor.target = "_blank"; | |
anchor.href = "https://osmlab.github.io/osm-deep-history/#" + window.location.pathname; | |
anchor.innerHTML = "<center>OSM Deep History</center>"; | |
displayContainer.appendChild(anchor); | |
sidebar_content.parentNode.insertBefore(displayContainer, sidebar_content); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment