gerben wrote:It works fine for me in Chrome. Did you restart the browser or at least refresh the page after installation?

OK, I found what was wrong. I had Tampermonkey on (to get script update notifications). Only had to disable it and install street to river again. Maybe put "a warning" about using Tampermonkey to tool's wiki?

// ==UserScript==// @name Papyrus: Street to river// @description This script create a new river landmark in waze editor papyrus. It transforms the the geometry of a new unsaved street to a polygon.// @namespace http://www.tay-tec.de/waze-street-to-river// @match https://world.waze.com/editor/*// @match https://www.waze.com/editor/*// ==/UserScript==

// Mini howto:// 1) install this script as greasemonkey script or chrome extension// 2) draw a new street but do not save the street// 3) add and apply a street name to define the rivers name and the the width of the river// Example: "20m Spree" creates a 20 meters width river named "Spree"// 4) Select the helper street// 5) Click the "Street to river" button// 4) Delete the helper street// 5) Edit the new landmark as you like

// Insert the script node into the page, so it will run, and immediately // remove it to clean up. Use setTimeout to force execution "outside" of // the user script scope completely. setTimeout(function() { document.body.appendChild(script); document.body.removeChild(script); }, 0); })();

// Stop running, because we know Greasemonkey actually runs us in // an anonymous wrapper. return;}

To create this effect automatically, I took the liberty of adding a bit of code to your script. Now it takes an extra parameter, "variancy", expressed as an extra parameter in the name of the river. As in "20m 30v Spree". Shorter segments are a bit wider, longer segments are a bit more narrow now. I would love to have created the effect depending on the angle between consecutive segments but I am afraid I did not completely grasp how you do the math (in getEquation), and the effect is good enough as it is now, I think.

In order NOT to pollute this thread with endless copies of code I send you my version as PM, maybe you can have a look to see if it is any good.