NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi This is only semi related to OSM, but I'm hoping someone here with expert knowledge can help me.

I'm using this bookmarklet to scrape the co-ordinates from OSM's URL & transferring them to a URL to loaded the equivalent location in Mapillary.

javascript:(function(){var%20a=/map=(\d+)\/(-?\d+(.\d*)?)\/(-?\d+(.\d*)?)/.exec(window.location.hash);window.open("https://www.mapillary.com/app/?lat="+a[2]+"&lng="+a[4]+"&z="+a[1])}())

For some reason it stopped working on the main OSM page. I'm using Firefox & sure there wasn't an update when the failure occurred. I've also failed on a old version of Firefox (43) but works in an old copy of IE.

It still works in the edit screen of Potlatch, but not iD.

I check site permissions but P2 & iD use the same https://www.openstreetmap.org

What has changed?

asked 10 Jul '18, 13:09

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%


What has changed? openstreetmap.org has a strict CSP since a day in May 2018.

See https://wiki.openstreetmap.org/wiki/Bookmarklet : "use a browser which supports bookmarklets on pages with a strict CSP (openstreetmap.org has one since May 2018). Firefox does not work; Chromium works."

I do not understand why it works on a P2 edit page.

Workaround (for many cases but not for your case): For osm object IDs I use Firefox' special bookmark placeholder %s in my bookmarks - see https://forum.openstreetmap.org/viewtopic.php?pid=675076#p675076 . In your case I see no simple workaround. Try to use Chromium/Chrome instead of Firefox of you want to avoid IE.

permanent link

answered 13 Jul '18, 22:10

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554
accept rate: 18%

edited 13 Jul '18, 22:12

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×60
×1

question asked: 10 Jul '18, 13:09

question was seen: 1,360 times

last updated: 13 Jul '18, 22:12

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum