[Script] WME Restriction Manager

Restriction Manager adds the ability to save, and apply, a set of restrictions in WME’s restriction dialog.

Greasyfork: https://greasyfork.org/en/scripts/369887-restriction-manager

To use the script, select a segment then click on ‘Edit restrictions’. New buttons will appear that enable an editor to save the restrictions present on one segment then apply them later to another segment.

Ex1.PNG

The script does not recognize new, or edited, restrictions that have not been applied to a segment. You’ll need to click on the Apply button and then click on ‘Edit restrictions’ a second time before you can save those restrictions to your browser’s localstore.

The direction of the restrictions is not stored. As a result, you can save the A->B restrictions on one segment then apply those restrictions in the B->A direction on another segment.

Clicking on the icon in the upper right corner will display basic instructions and controls for exporting, and importing, saved restrictions.

Ex2.PNG

This looks like it could be extremely useful - thanks :slight_smile:

It would be even better if you could find some way of displaying the start and end dates of the restriction on the initial window. Where there are restrictions that vary in time throughout the year, they’re very difficult to manage easily without that date range information being visible.

This sounds great and like something that we’ve been talking about needing for quite a while!

Could you add some screenshots of the implementation to the initial post? This way we can see what the implementation looks like and what to expect once the script is installed.

Also, it should be noted that the restriction has to be applied to the segment before it can be saved - I tried adding a restriction to a segment and saving it before hitting Apply and it was not saved.

Woodvale,
That’s a good idea. I must warn you that it might be a while before I have time to implement it.

JustinS83,
Thanks for the advice. I’ve added the images and a warning about applying before saving.

Looks good!

Thanks for working on this - it has been long discussed as something that would be beneficial

This looks like a great help. However, it seems to work only for segment restrictions, not turn restrictions. The script’s controls (sometimes) appear while editing turn restrictions, but applying a saved restriction doesn’t seem to do anything.

I used this script for the change of restrictions on our EZ-Pass only toll roads and it saved so much time! Thank you @kjg53.

Sean

Definitely looking forward to putting this script to use, thanks for coming up with this!

Updated to version 1.1 which blocks the script from running when editing turn restrictions.

Thanks for the positive feedback.

Ugggh. I was wishing for something like this for initial opening of Georgia’s Northwest Corridor express lanes.

Thank you.

Hi and many thanks for this script !
Could it be modified to enable when using waze.com/fr/editor/ WME address ?

It looks like it should already work, but maybe replace the @include with

// @include        /^https:\/\/(www|beta)\.waze\.com\/(?!user\/)(.{2,6}\/)?editor\/?.*$/

Thanks for this great script. Any chance it will support turn restrictions at some point?

Hi Aile and kjg53.

Aile85, this script don’t works for you (and non-english WME) because the restriction dialog title is hard coded in english, line 285.

kjg53, please, can you replace :

if ("Time based restrictions" == title) {by

if (I18n.translations[I18n.locale].restrictions.modal_headers.restriction_summary == title) {

I knew this script would come in handy someday, and it sure did! I just added the newly-opened I-77 Express Lanes north of Charlotte, and this made the process of adding the restrictions much easier, plus ensured the restrictions were consistent on all restricted segments. Thanks!

Thanks Sebiseba for the clue to make the script work when WME isn’t using English. To be honest, I still need to figure out the correct way to add I18n for the script’s own labels.

awesome!
But I found a problem:
I saved a restriction for (taxi, motorcycle, and private) but when I apply it to another segment it applies only to taxis

Can you provide a PL to the segment whose restrictions were saved? I’d like to check whether this issue is in the code that saves the restriction or in the code that applies the saved state to a new segment.

This one https://www.waze.com/it/editor?env=row&lon=14.17931&lat=42.41347&zoom=5&segments=81333341

It should be fixed. Thanks for catching that one.