Last active
March 29, 2017 22:32
-
-
Save Adrianod/e6b522bf1715a49b68c2 to your computer and use it in GitHub Desktop.
Userscript to mark tiles as dirty on openstreetmap.org. Usage: alt-click on a tile to mark as dirty.
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 click n' dirt | |
// @version 0.1 | |
// @description Alt-click to mark tiles as dirty on openstreetmap.org | |
// @include http://www.openstreetmap.org/* | |
// @include https://www.openstreetmap.org/* | |
// @copyright vax 2014 | |
// ==/UserScript== | |
var code = '\ | |
$("#map").on("click", ".leaflet-tile", function(e) {\ | |
if (e.altKey) {\ | |
$.ajax({\ | |
url: this.src+"/dirty",\ | |
context: this\ | |
}).done(function() {\ | |
$(this).fadeTo("fast", .2);\ | |
});\ | |
}\ | |
});'; | |
var script = document.createElement("script"); | |
script.textContent = code; | |
document.body.appendChild(script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment