[Script] WME Validator v2020.11.1 (PLACES BETA)

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.

Moderators: Unholy, bextein, Glodenox, JustinS83

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

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Re: [Script] WME Validator 1.1.16 / 29.01.2016

Postby Glodenox » Tue Mar 29, 2016 4:58 pm

Weird, for some reason it seems to still be working on Firefox...
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.16 / 29.01.2016

Postby Glodenox » Wed Apr 06, 2016 12:56 pm

I've made a userscript that brings back the icons in the UI of WME Validator (or any other script that still uses the old FontAwesome 3.x-style icons): https://www.waze.com/forum/viewtopic.php?f=819&t=184439

This won't fix the issue in Google Chrome that you guys seem to be having though.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.16 / 29.01.2016

Postby Glodenox » Fri Apr 15, 2016 6:57 am

Same issue here. And I've been unable to find any errors that seem to point to the script in the browser console. Except one error inside GreaseMonkey about a missing method modelFor, which doesn't appear when I disable WME Validator:
Code: Select all
TypeError: Type does not implements method: modelFor#fv89c0nqmvc core.js:116:1
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.16 / 29.01.2016

Postby Glodenox » Sat Apr 23, 2016 8:31 am

I've found that the issue is located somewhere in the initialization of the script. It waits for a user login, even though there is already a user logged in. By executing the following bit of code I'm able to make Validator appear again on Firefox:
Code: Select all
Waze.loginManager.events.triggerEvent('login');

In the shape of a bookmarklet that gives:
Code: Select all
javascript:Waze.loginManager.events.triggerEvent('login');

So I'm guessing (as I can't read the source code) that the check for a logged in user is incorrect or that the state listener is added too late.

Personally I'm using this code to trigger when the user has logged in and this seems to work fine:
Code: Select all
    if (typeof Waze === 'undefined' ||
        typeof Waze.loginManager === 'undefined') {
      setTimeout(init, 100);
      return;
    }
    if (!Waze.loginManager.hasUser()) {
      Waze.loginManager.events.register("login", null, init);
      Waze.loginManager.events.register("loginStatus", null, init);
      if (!Waze.loginManager.hasUser()) {
        return;
      }
    }

EDIT: oh wait, it seems I also have another check before I can actually access the tabs (to add a tab or manage them):
Code: Select all
    var tabs = document.querySelector('#user-tabs .nav-tabs');
    if (!tabs) {
      setTimeout(init, 400);
      return;
    }
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.16 / 29.01.2016

Postby Glodenox » Sun Apr 24, 2016 8:44 pm

In theory, that's not an error. ‰ stands for 'per mille' (per thousand). So 33‰ = 3.3%
But as this symbol isn't used that often, I also think it would be better to replace it with a percentage instead.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.17 / 01.06.2016

Postby Glodenox » Wed Jun 01, 2016 8:09 am

Firefox is giving the following error in the browser console:
Code: Select all
SecurityError: The operation is insecure.

This is usually caused by a Same Origin Policy issue.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.18 / 02.06.2016

Postby Glodenox » Fri Jun 03, 2016 9:28 am

Yay, Validator is working again on Firefox as well! Thanks!

In order to move the processing of segments to another thread: perhaps you could look into moving the processor to a Web Worker? Though it does seem to be a bit difficult to use in a userscript.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.19 / 04.06.2016

Postby Glodenox » Mon Sep 12, 2016 9:59 am

I think the internal structure for street names or cities changed a bit, causing the script to mark all road segments as 'missing country and state'. I haven't done a lot yet with that part of the data model, so I can't remember what it used to look like.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.19 / 04.06.2016

Postby Glodenox » Sun Oct 30, 2016 10:36 am

The past 4 pages in this thread already talk about this issue ;)
You can somewhat mitigate the issue by putting "!23" in the "Reported as" field in the search tab, though it will still slightly break the script.

We'll have to wait for the script author to fix this, I'm afraid.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby Glodenox » Thu Jan 05, 2017 7:57 am

The script is sort of encrypted, but as with anything you have to run, there are ways of looking at what is inside. That said, I don't think that's the way to go here.

Basically, the script should be made more robust to not fail completely whenever a certain validation fails. Do we have a full list of all checks the script performs somewhere? Including all regional differences would probably become troublesome though.
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
[ img ][ img ]
Glodenox
Waze Global Champs
Waze Global Champs
 
Posts: 1211
Joined: Tue Aug 11, 2015 9:04 pm
Location: Belgium
Has thanked: 691 times
Been thanked: 1356 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: Google [Bot], jm6087, The_Cre8r