Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Userscript to mark tiles as dirty on Usage: alt-click on a tile to mark as dirty.
// ==UserScript==
// @name click n' dirt
// @version 0.1
// @description Alt-click to mark tiles as dirty on
// @include*
// @include*
// @copyright vax 2014
// ==/UserScript==
var code = '\
$("#map").on("click", ".leaflet-tile", function(e) {\
if (e.altKey) {\
url: this.src+"/dirty",\
context: this\
}).done(function() {\
$(this).fadeTo("fast", .2);\
var script = document.createElement("script");
script.textContent = code;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment