[Script] WME Presets v1.1 -- 2021-04-11

Download on GreasyFork

What does it do?
This script allows you to create settings presets for WME Layers and various scripts. You can then apply a Layers preset or a script preset by hovering over the added menu button and clicking the desired preset.

How do you use it?
The script adds a button to the WME Toolbar just to the right of the Search box, with a layers-type icon. Hover over this icon and the menu automatically opens.

WMEPresets.png
Within the menu is a section for WME Layers, plus a section for every other script it handles. If you don’t have that script installed, the section won’t be shown. Please note that WME Layers presets only include “standard” WME Layers. Where a script (like Magic) adds a layer to the Layers menu, it will not be picked up by this script.

By each section heading is a + button. Click that button to add a preset of the relevant type - it will save your current settings for that type. Give it any name you like as long as it’s unique within that section. Spaces and punctuation work fine.

Each saved preset will show some controls on the RH end of the line when hovered - with the controls, you can rename, re-order or delete them.

When the script has been updated, the toolbar icon will be red to show that an update message is waiting. Clicking on the icon will show the latest update message and clear its “unread” status. CTRL+click on the icon opens this topic

Why did I create this script?
Initially, I was looking to create a script to handle WME Layers. We’re all familiar with the problem when you open a Permalink which includes a layers parameter and your layers are completely changed from what you prefer. Or you want to change several layer settings at once but it takes half a dozen clicks. There is another Layer Saver script already that did what I wanted - but you have to deselect any segments, click the correct tab in the LH panel, select the layer set from a dropdown, then click to apply. I wanted something that required much less interaction and didn’t interfere with anything selected.

However, it’s not just WME Layers where the problem occurs. I use WME Color Highlights. Sometimes I want to change several settings depending on what job I’m doing. Sometimes I want all the highlights off. So I extended my idea from just creating presets of WME Layers to also creating presets for WMECH.

There are other scripts that have a lot of settings - and for some of those, I again want to sometimes change several settings at once. The column set in the Toolbox Select Segments dialogue is something I change several times a day; or at least I would if it didn’t take so many clicks!

What scripts does/will this work with?
My intention is to cover scripts where there is a regular need to change multiple settings at once. Initially, I’m targeting scripts I use myself. But once I’ve covered all of those, I’ll be accepting suggestions for other scripts. But before you ask, please consider whether there’s a need! For example, ClickSaver has 28 checkboxes, but once initially set up there’s no need to change them.

Currently, I cover:

  • WME “native” Layers
  • WME Colour Highlights
  • WME Toolbox Highlights tab

Next on my target list is the columns in the Toolbox Select Segments and Select Places dialogues.

After that, I’ll be considering request for other scripts. Without great difficulty, I should be able to handle any script that has a collection of settings in a dialogue or WME tab. I can handle checkbox, text, numeric and colour input elements.

1 Like

Known issues
None so far; I’m sure that will change! :lol:

Roadmap
Adding WME Toolbox Select Segment & Select Places column sets.

Publication History
v1.1 – 2021-04-11
• UI changes so the script works without WME FixUI installed
• Adjustments to work with Firefox
• Removal of Font Awesome dependency loaded by another script

v.1.0 – 2021-04-10
• First public release!

Thanks Iain,

Can’t wait to see what this will do for me.

Don’t wait!

Install it, try it, let me know what you think. :lol:

Already installed and trying out. My first thought is maybe something that points out which one is currently active.

Maybe a highlight

Or bolding

I am leaning toward bolding the active option

As expected

There isn’t really any such thing as an “active” option.

I’m a great believer in a script that can’t slow down WME. By preference, unless you ask it to do something, it’s doing absolutely nothing, and that’s the case for this script.

When you apply a preset that’s all that happens. There is no monitoring of any changes to the layers or settings, so which set you last applied becomes meaningless the moment any of those settings gets changed.

I did get asked, during beta testing, about applying a set by default on page load, but I decided that was potentially intrusive and could cause problems. What if your “default” layer set doesn’t show places? Every time you load a permalink to a place, nothing would be selected.

Pretty much all the presets this script handles involve turning visual effects on the map on/off, so there will generally be visual clues anyway. In addition, I did my very best to make it as easy as possible to load a preset. Opening the menu and looking to see which preset was last set is only fractionally less difficult than opening the menu and just selecting it anyway. :wink:

When I say “active”, I just mean a visual indicator of which preset option you are currently using.

For example: If I have a preset that turns off my UR layers and it is currently selected. I can alway look at the presets and quickly remind myself which preset per section is currently being used.
I was not thinking that it would slow down WME at all by just changing the selected preset to bold.

Old age, easy to forget :smiley:

That said, I am a great believer in providing my thoughts and ideas and letting you decide whether it is worth it or goes beyond the intent of the script. I will never complain or hold it against any script writer for thinking my ideas will not work or is just plain crazy.

EDIT:
I was thinking your next script would have an acronym of PITA or something :lol:

I get what you mean. But you are only “currently using” a preset the moment you apply it.

Sticking with WME layers for the example, if you apply a preset that turns off your UR layers, then it’s “current”. But your next action might be to turn one of the layers back on. The preset will therefore no longer be current: leaving it highlighted would be inaccurate and monitoring any layer changes to unhighlight it when that happens isn’t something I wanted to do. :wink:

I was only thinking about clicking between presets, not that you would mess with the layers manually as well.

I can see how that would be using WME resources since it would have to monitor actions in the layers menu as well.

Thanks for the explanation

Looks interesting. Will this work in wne production and beta? It would be nice to save all your presets in production and then easily apply them to the same scripts in beta

It does not appear to bring your presets over between Prod and Beta

Would be nice to have at least a small indicator of your “last used” selection though. WME Bookmarks does the same thing, optionally—it’ll highlight your last-visited bookmark, whether or not you’re anywhere near there. No need to track subsequent changes.

edit Would also be nice if it worked for those of us not running WME FU. As is, I can’t get to the menu from the icon fast enough before it disappears.

I am running WME FU, but I also cannot get to the menu from the icon fast enough either.

This links to a video I made of my screen so you can see what is happening.

Version 1.1 is published on GreasyFork. :mrgreen:

First off are adjustments to the UI to deal with the absence of WME FixUI. When designing the UI for WME Presets, I made efforts to re-use formatting from the native WME UI, and early versions of the script worked well with & without FixUI running. But at some point that has apparently changed. This update, along with an update to FixUI which I published a short while ago, should see the scripts interact properly and this script work without FixUI.

Whilst making the above adjustments, I discovered that Firefox is rendering the WME UI slightly differently from Chrome - so there are additional changes for Firefox.

Lastly, whilst testing in Firefox (where I only have 2 scripts installed), I discovered that the Font Awesome icons I was using for renaming/re-ordering/deleting sets weren’t actually part of the native WME. They must be loaded by some other script I have installed on Chrome. I therefore had to change to only use the icons loaded by WME.

1 Like

It does work in Beta, but the settings aren’t common between Production and Beta. This is also true for WME FixUI, my other script. The reason is simple to explain: Production and Beta WME are hosted on 2 different domains and the browser localStorage is keyed to the domain.

I did some quick Googling on the subject. Whilst it is possible to use a common storage for different subdomains of waze.com, it doesn’t look very easy or elegant and it isn’t something I’m likely to try.

However, I may consider implementing some sort of import/export of the settings via the clipboard. I know several other scripts implement similar functionality. It would be useful not just to transfer presets from Production to Beta, but also for copying settings between browsers on different computers (home/work).

1 Like

At work rn, so I can’t install scripts until I get back home, but this looks awesome!

PITA would have been a good acronym, but not for the reason you think! :lol:

WME FixUI’s acronym does make a statement of my opinion about the designers of the WME UI. When they first moved to zoom bar without reason, I decided to take action. At one point, I hoped that we could get them to listen to reason and WMEFU could wither away. Instead, in the years since then, my contempt for the UI design team has only deepened and WMEFU has only grown in scope.

This script is not designed to fix something done by Waze. It isn’t adding a function that I believe should be part of the native WME. I’ve created it as an “expert” tool to condense the multiple clicks involved in changing a bunch of settings into a single click; to automate something I do all the time (or at least I would if it wasn’t so inconvenient without the script).

However, the script itself has been a PITA to me. If I had to quantify the amount of work I’ve put into this script so far, I would say that it breaks down as follows:

  • 10% - creating the functions to read/store/apply settings
  • 10% - deciding what to call it :lol:
  • 80% - creating an acceptable UI
    I’ve been working seriously on this script for the last 4 weeks - and the last functional addition was over 2 weeks ago. The rest of the time has gone on making the buttons work and display properly. I didn’t publicly release this script until I was happy that the UI was simple, clear and usable without detailed instructions.

As for the native WME UI: yes, making a good UI is a lot of work. It’s not easy. But that’s why you pay developers to create a good UI and it’s what you should expect to get. And it isn’t what we get. :frowning:

Don’t forget about listening to the grunts who actually use the UI when they say this design don’t work. :mrgreen:

This is a great idea and script - thank you!

Would you consider adding the ability to handle WME Color Highlights? At times I like to switch back and forth between looking at segments with or without speed limits added. TB lets you show segments with speed limits added, but not invert that.