This is probably possible, but I see that there is already a PR in the website code that disables scale on hover. Let’s wait a bit
@TrickyFoxy Great script—nicely done! Personally, I’d prefer a dedicated Chrome/Firefox extension. Setting up Tampermonkey can feel a bit hacky and requires extra steps (like manually enabling user scripts), and ViolentMonkey isn’t Manifest V3 compliant and installable at the moment. I think you’d reach a much wider audience—and get more feedback—with a proper extension.
(For context, I maintain the iD Strava Heatmap browser extension for Chrome and Firefox.)
The main reason why this is a userscript and not an extension is to install and update scripts in two clicks. Yes, you need to install TamperMonkey/ViolentMonkey, but after that there are no problems with building the script. Everything is in one file, and anyone can edit it without installing the IDE, npm and other developer tools. (although it may be that I haven’t reinstalled Tampermonkey in Chrome for a long time)
More than once, updating the osm.org
broke the script, but an update with a bug fix could be installed immediately after its release by simply clicking on the link. And within one day, it would have reached the users by itself.
I also don't want to mess with the Chrome Store and AppStore.
At least you will have to pay once to publish the extension, and I would not like to pay these companies just for the right to publish a non-commercial extension. Firefox Add-ons Store allows you to do this for free. And now I’m too lazy to circumvent the sanctions to pay this fee.
Oh yes, Safari doesn’t even have an API that can help bypass CSP on osm.org the script works in it using Tampermonkey but is very limited.
Bypassing CSP
is a pain. CSP prevents you from using JavaScript objects to manage map, prevents you from adding images from third-party sites, and much more. Manifest V2 and V3 have different mechanisms for circumventing constraints. Initially, the script only supported Tampermonkey, because it better supports both Manifest V2 and Manifest V3. Firefox still has not implemented the userscripts API in Manifest V3. However, the userscript API will be disabled for extensions that are not the userscript manager in the Firefox Add-ons Store. Meanwhile, Chrome disables extensions for Manifest V2.
Userscripts have at least some kind of imperfect but stable API.
I think you’d reach a much wider audience—and get more feedback—with a proper extension
I don’t think random people in extension stores need advanced features of osm.org
. Many users are nice, of course, but it is not the goal. Well, I’d be lying if I said I don’t like it when someone puts a star on GitHub, but I’m mostly driven by my free time as a student (which has one year left :), gaining experience in JavaSctipt and helping the community. And I also just use all the features in the script as mapper
ps 1.1.8 published, I’ll write a changelog a bit later
1.1.8
More filters for notes
Now you can hide notes with a certain word or from a certain user.
There is now a filter icon next to usernames. And also view notes for all time or hide closed ones
And if you click on a note with alt
, it will disappear from the map until the page is reloaded
Search GPS tracks
Now you can get links to GPS tracks in the map view area
By the way, to make it easier to get to the note F
ilters and GPS tracks search button, you can now press the F
key
Coordinates for ways
You can find out the length of the way, the area of the polygon and copy the coordinates of the corners, center and bbox
NB: Only for ways for now. And maybe I’ll replace the emoji with an icon to make it less distracting
Other
-
Drag’n’Drop support for KML/KMZ tracks (only points, lines and polygons, no styles or images)
-
alt
+C
to copy the coordinates of the map center -
The title for links to usernames now shows the number of blocks
-
OSM Building Inspector joins the list of 3D building viewers
-
I also fixed the street panorama preview and the relation view button on the changeset page
URL for force update
1.1.9 mostly has bug fixes, but also a few features:
- Badge for corporate cartographers:
Thanks again to Piet Brömmel this time for the wiki page parser with usernames.
The list of usernames can be found and updated here. If there is no company, then send the PR to this file openstreetmap-statistics/src/save_corporation_contributors.py at master · piebro/openstreetmap-statistics · GitHub and after some time I will update the list for the script
- For blocked users, the reason for blocking is now displayed
And yes, clicking on the icon can add them to the changesets filter. So far, this is only supported for blocked and coprorative mappers.
I also noticed that in Show changesets from mode, you couldn’t specify multiple usernames. Now you can.
- The script is now run on
https://github.com/openstreetmap/openstreetmap-website/issues/new*
to warn you before adding a bug report to the openstreetmap-website repo
- for notes and nodes you can press the Z key multiple times to zoom in more
upd: another fix for the changeset viewer will be coming soon (This is due to upcoming changes in the site code)
upd: fixed in 1.1.9.1
1.1.9.3 — minor bug fixes, fixed alt
+ S
, supported Q
for alerts, replaced corporate cartographer emoji from to
.
Also allowed viewing of changesets, where thousands (6000) of ways were changed. It works not fast, but now you don’t need to click through pagination.
Also I finally set up the formatter for the script code, so the diff turned out to be very large due to the deletion ;
and changing indents and spaces (:
1.1.9.4 more bug fixes and a couple of things that are important to mention:
The zoom step with the + / - keys has been doubled
You can disable this in the settings. In fact, this feature has already been implemented. By default, the map is set to osm.org out of focus, and if it’s out of focus script added the ability to zoom with the +
/ -
buttons. But if the map was in focus, the zoom changed as before.
Moreover, the same effect can be achieved if you press shift
+ +
. You can even press shift
+ ←↑→↓
to speed up the map shift. But the map should have been in focus. Now, after pressing +
/-
, the map is always in focus.
For normal zooming now use alt
+ +
/-
In the tooltip for restored or deleted objects, you can see who did it
Either it will be immediately written that the author himself deleted or restored his objects.
And this is a good reason to remind you what is the difference between solid and dashed lines on the map
Dashed line — the way is now deleted
Solid — the way currently exists.
In practice:
Red dashed line — the way was deleted in changeset and not restored
Solid red line — the way was deleted but it is now restored
Similarly green:
Green solid line — the way was created and still exists
Green dashed line — the way was created in the changeset, but it is now deleted
Reading OSM map layers: Integrate FIXMEs with map notes & thinking that this could be something that Better OSM could do, but then I see Highlight FIXME=* · Issue #95 · deevroman/better-osm-org · GitHub which suggests it’s already been done?
If so, how do we turn it on?
This means highlighting in the tag list:
I suspect it’s about showing fixme on the map. Well, you can write fixme
in the Overpass request alert :ㅤ)
p.s. or shift
+ \
, shift
+ NumpadDivide
depending on the layout
1.1.9.6
-
you can list multiple substrings and usernames in the notes filter
-
the filter by the substring is now case-insensitive
-
note filter by words no longer uses OSM API, but is executed locally. Now it works like substring search. It should now work more predictably
-
Alt
+click
now works for the active note too -
The date of the changeset is immediately shown on the deleted user’s page
-
many fixes for Safari (but most functions still don’t work)
p.s.
Maybe I missed the how to, but it’s been bugging me forever. When reviewing a CS it has a line listing warnings, when there are. Looking for a way to be able to go from the CS warning label to the item the warning applies to so it can be resolved, if it needs resolving.
Edit: Opened issue/feature request in ID’s github
a quick glance at the code of all checks seems to be located here iD/modules/validations/index.js at ef8ed155b6e3f5304abb86d7e549965431c4cafd · openstreetmap/iD · GitHub
The OSM API does not have any additional metadata about the results of iD checks, which means that I will need to port the code from iD to the script. I must admit that I am very reluctant to do this, because it will require monitoring the iD code.
I think it’s better to refer to the iD maintainers, so that instead of the number of objects, they show their ID. I think 10-20 IDs will easily fit into the tag length limit. This should be enough for most changesets.
Well except in such cases Changeset: 71156582 | OpenStreetMap
Is it possible to disable the userscript hiding changeset tags like host
?
There’s currently no such setting. The script currently only hides host=https://www.openstreetmap.org/edit
. Are there any situations where this tag is useful?
p.s. only has this host value in mind. It also collapses v:
and shortens ideditor:
to iD:
I was reviewing a changeset with strange lack of other changeset tags, so I assumed the absence of the host tag was part of that issue.