Skip to content

Commit

Permalink
Update osm-org-greasemonkey.user.js
Browse files Browse the repository at this point in the history
Fix Note sidebar (Overpass history) not working because note creation time is now in it's own time-tage (openstreetmap/openstreetmap-website@24a562f)
  • Loading branch information
kmpoppe committed Jun 28, 2024
1 parent dc24e1a commit 46819b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osm-org-greasemonkey.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function modifyContent() {
// Overpass History
note_details = document.getElementById("sidebar_content").getElementsByClassName("details")[0];
note_location = note_details.getAttribute("data-coordinates");
const note_time = new Date(Date.parse(note_details.querySelector("abbr").getAttribute("title"))).toISOString();
const note_time = note_details.querySelector("time").getAttribute("datetime");
thisUrl = "http://overpass-turbo.eu/?Q=%5Bdiff%3A%22" + note_time + "%22%5D%3B%28nw%28around%3A~~radius~~%2C" + note_location + "%29%3B%29%3Bout+body%3B%3E%3Bout+skel+qt%3B&R";
createOrUpdateOverpassHistory("GM-OVERP", displayContainer, thisUrl, "<span style=\"color:rgba(0,0,0,.7);font-weight:700;font-family: Helvetica Neue,Helvetica,Arial,sans-serif;\">Overpass</span> History", "btn btn-outline-primary");
}
Expand Down

0 comments on commit 46819b8

Please sign in to comment.