Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.
Post by Glodenox
Turned out that the fix was quite easy: when I enabled strict mode for JavaScript, let is supported in Chrome. It would have been a bit more complex to do that piece of code with var, so I'm happy there was that option. (v1.0.1)
Next to that, I've also noticed that the reset buttons next to the tab size sliders didn't fully work as Google Chrome didn't allow for an InputEvent to be constructed (even though it's the only correct event to trigger for range inputs). Luckily I found an even simpler solution to the code I was trying to fix. (v1.0.2)
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
Thanks for testing it with those other userscripts! I personally don't have them running, so I wasn't aware they'd override the width of the tabs.

URO+ will set the padding of tabs to 4px each second and there is no option to disable this, sadly enough. I could easily catch the change and revert it without it ever being visible, but I'd rather not start fighting other userscripts. I'll ask the author to make this a setting in the misc tab instead of just applying it all the time.

As for WME Maximized: I didn't think anyone would apply those CSS rules with the !important option as generally this shouldn't be necessary if you are adequately specific in your selectors. I've now applied the !important option as well and override the rule set in those styles. At the same time I made my script play more nicely by not adjusting the tab size if nothing has been configured in the preferences (or both values have been reset). (v1.0.3)
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Last edited by Glodenox on Mon Jan 25, 2016 9:20 am, edited 1 time in total.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
Hipska notified me via Slack that on Google Chrome the tabs sometimes didn't start completely on the left whenever there was a tab with its name replaced by an icon on the row above. This has been fixed in version 1.0.4.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
That is very weird as I've specifically put "use strict"; before the first line of code to enable strict mode for the "let" statement.
Based on the output, I think you're using Google Chrome?
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
Heh. That's when cutting edge becomes bleeding edge. I've changed the 'let' statement for which I enabled strict mode in version 1.0.5. Now the script uses a regular var and lets each element store its value in its dataset. I would have preferred to just use the variable that is already declared in the loop, but the scope of a var doesn't allow for that to work.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
Yep, that's the advantage of having access to the beta version of the WME :)

I had already noticed the issue with the feed tab as well. It's probably not too hard to make an exception for the Waze feed refresh action, so I'll try to look into that soon.
As for keeping only the refresh icon: I think that could come with the "text replacement" function I still want to add to this script. That way it would be possible to replace the tab with no text.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
Thanks for the suggestions! I'll look into them soon. Especially the import/export could be handy indeed.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
I've been working with the HTML5 sortable plugin available in Waze for another userscript, so that shouldn't be too hard. Originally that's how I intended to make the tab list sortable, but somehow I couldn't get it to work back then.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
Version 1.1 has just been released with the following changes:
- The list with tab names can now be dragged around
- Quick tooltips for tabs with replaced names (and also existing tooltips)
- Bug fix concerning the order of the last tabs with some missing tabs

I've already made the first changes towards importing and exporting data, but it's not done yet.
As for replacing the text or the title of a tab or changing the background colour: that isn't really difficult to do, except I'm still trying out how I'll structure the forms for that. Right now, the tab details pane is a bit of a mess.

I've also only just now noticed my message of a month ago about the refresh action on the feed tab. I'll look into that again. I'll probably try to preserve any click listeners I find on the first element within the tab with listeners. But that will need some proper testing first.

EDIT: and there's version 1.1.1. Apparently the character set in my text editor somehow got changed, which resulted in several icons for FontAwesome to go missing.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
Just released version 1.1.2, which contains only two small changes:
  • Removed the code that always set the scrollbar on the side window as the new layout puts the scrollbars within the tab containers
  • Version is now displayed in the config tab with a link to this topic
I've got some other features I'm working on that shouldn't take too long to finish, but lately I've been very busy (or rather: not that busy as I was on holiday). I'll try to put some more work in this script soon.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1569
Answers: 1
Has thanked: 279 times
Been thanked: 946 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png