Mapki's Deep Diff/Bookmarklet

From OpenStreetMap Wiki
Jump to: navigation, search

An unofficial bookmarklet (see this page's history for authors) tested only with Chrome, Firefox, and Pale Moon (edit this if you tested in another browser).

Run this on a page (/history page works too) of a node, way or relation (elements) – example. The bookmarklet opens the deep diff page (example) in a new tab.

For Chrome:

  1. Create a new bookmark.
  2. Name the bookmark.
  3. Paste the javascript code into the URL box.
  4. Click the save button.
javascript:var urlParts = document.location.href.split('/');
if (urlParts[2] === '') {
    switch (urlParts[3]) {
    case "node":
    case "way":
    case "relation":
        var idMatch = urlParts[4].match(/\d+/);
        var objId = idMatch[0];
        (function () {
  '' + encodeURIComponent(urlParts[3]) + '.php?id=' + encodeURIComponent(objId));
        alert('Only nodes, ways and relation histories can be inspected.');
else {
    alert('This is not a supported page.');