Glodenox / wme-om

Waze Map Editor - Open Maps userscript
GNU General Public License v2.0
8 stars 7 forks source link

Consider removing the @connect permissions #99

Closed Glodenox closed 2 weeks ago

Glodenox commented 3 years ago

Adding @connect permissions results in users getting a window asking for their confirmation and sometimes also blocks automatic updates. These permissions are used to retrieve the FeatureInfo details of the server at a certain location and to retrieve the error message sent by the server, which is then reported in a somewhat hidden tooltip.

The latter one isn't really that important and the script could say that one or more map tiles failed to load and to look in the console for more information. In the console the script would then provide the URLs for the failing map tiles so it can still be investigated.

The first one however is a core feature. It should be investigated whether it really isn't possible to use fetch() to get this data. I vaguely seem to remember one or more servers not having a Access-Control-Allow-Origin: * header, which caused issues there.

Glodenox commented 2 weeks ago

This doesn't seem to be possible, as -indeed- some servers don't have that header set. I'd prefer not to use proxy servers to bypass that sort of thing and querying the map is a core feature I don't want to take away from those maps.