[Script] WME Fix UI v2.44 -- 2020-02-12

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 Fix UI v0.7

Postby Twister-UK » Tue Jun 14, 2016 1:31 pm

The black bar and side panel size reduction options don't play particularly nicely with any of the geometry editing tools - with either or both of them enabled, there's an offset between where your mouse pointer is and where WME *thinks* it is:

Image

When it's just the black bar option enabled, the small vertical offset isn't all that noticeable and can easily be accommodated for when editing. The much larger horizontal offset caused by the sidebar shrink option makes editing slightly more interesting however - feels a bit like using one of those old-school pantograph jobbies to trace one image onto another...
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v0.8

Postby Twister-UK » Wed Jun 15, 2016 4:00 pm

I'd noticed the WME update, but WFU doesn't seem to have been affected by it here - looks like all of my settings are being applied on startup as expected, with no need for me to manually toggle them again once WME has finished loading.

I think the only way to guarantee a script will reach 1.0 before Waze manages to break it, is to start versioning from 1.0...
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v0.9

Postby Twister-UK » Thu Jun 16, 2016 11:56 pm

The first problem is that Waze.loginManager doesn't have an .on() function, so if addMyTab detects the user isn't logged in yet, the attempt to set up the login event handler fails and it's game over.

The second problem is that changing this line to Waze.loginManager.events.on(...) doesn't cause an event handler setup failure, however the event handler doesn't appear to get set up at all, and it's game over.

The third problem is that changing this line again to Waze.loginManager.events.register("login", null, initialiseFixUI) doesn't cause a setup failure and the handler DOES now claim to be set up, but the bloody thing still doesn't fire when the login process completes. Game over yet again...


If you've ever wondered why my scripts adopt the seemingly primitive technique of polling the login status every 100ms rather than using the more elegant event handler approach, now you know - sometimes trying to do things the right way simply doesn't work, and because the reason for it not working is buried within the event handler mechanisms of the JS engine, trying to work out why it doesn't work is tricky.
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v0.10

Postby Twister-UK » Fri Jun 17, 2016 7:22 am

iainhouse wrote:v 0.10 is now published on Greasyfork. Hopefully this will fix the Firefox issue.

Twister-UK wrote:The first problem is that Waze.loginManager doesn't have an .on() function...

I've probably misunderstood, but it sounds like you're saying using the Waze.loginManager.on() won't work at all on Firefox. But I reckon it should, as I nicked that code from Tim and his script certainly does. Plus this is the first Firefox complaint I've had.


It won't work at all on Chrome either, the function simply doesn't exist:

Firebug Console wrote:Waze.loginManager.on("login",alert)
TypeError: Waze.loginManager.on is not a function


and

Chrome Console wrote:Waze.loginManager.on("login",alert)
VM122:1 Uncaught TypeError: Waze.loginManager.on is not a function(…)


Not sure which of Tim's scripts you got that from, WMECH is the only one I'm using that uses loginManager, but that's using the .events.register() method for catching the login event (and as noted previously, this also doesn't work - WMECH on FF also therefore suffers the same random startup failures as I'm seeing with WFU...).

When I had a quick look at the behaviour of WMECH, it seemed like FF and Chrome were differing just sufficiently in how quickly WME was initialising itself versus how quickly the scripts were being initialised, such that on Chrome the "not logged in" code path never seemed to get called and any bugs present would therefore not be exposed.


No change with 0.10 BTW - when WME first loads and you call addMyTab() directly from initialiseFixUI() with modeID set to 0, it follows the same code path as it did in 0.9, with the same results if it then needs to call the "not logged in" branch.
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v0.10

Postby Twister-UK » Fri Jun 17, 2016 10:30 am

OK, so in FF at least, the login event doesn't trigger during WME startup because, if the browser thinks you're already logged in (correct cookies etc. set), then WME doesn't call the login function and therefore no login event is generated...

If you log-out of WME and then log back in, the event is generated and WFU initialises correctly (once the correct code is used to attach the event listener!).

So, the problem WFU, WMECH and other scripts using this same technique have, is that they're assuming the lack of certain UI elements means that the user isn't logged in and that WME will therefore be completing the log-in process at some point in the future. However, since these UI elements can also be missing due to delays in the browser finalising their creation once the login process has completed, this is an unsafe assumption to make...
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v1.2 -- 2016-07-03

Postby Twister-UK » Thu Jul 07, 2016 1:06 pm

atrophicshiner wrote:Any way to make the on hover event a clickable link :?:


Yes ;) Having finally worked out how to access WME from behind the great firewall of China (or possibly just from behind the godawful ISP my hotel is using...), I've been able to do something other than real work on my latest business trip, and this behaviour has now been tamed. Expect to see a release once I'm back in the UK at the weekend...
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v1.4 -- 2016-07-12

Postby Twister-UK » Wed Jul 13, 2016 1:11 am

Small problem with the "Shrink bars above the map" option - with it enabled (regardless of whatever other settings are or aren't enabled, or which other scripts are or aren't running), the small gap that's created between the bottom of the blue bar and the top of the places or roads/roundabouts/etc drop-down menus makes it difficult to mouseover into the menus without them closing due to the mouse pointer entering the gap. Some of us remember this being a native WME bug from back in the days when Waze first introduced this version of the UI, so seeing it again brings back some fond, or not so fond, memories...

Note that the layers menu doesn't suffer this same problem to the same extent despite there also being a visible gap between blue bar and dropdown - provided the x co-ord of the mouse pointer remains within the left and right bounds of the "eye" icon, it doesn't matter whether it's over the gap or the menu, the menu remains open. It's only if the pointer moves off to the side away from the eye that the menu then closes again unless the pointer is then over the menu rather than the gap.
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v1.4 -- 2016-07-12

Postby Twister-UK » Wed Jul 13, 2016 1:29 pm

Once you've selected a segment, the following line of code may then be all you need:

Code: Select all
document.querySelector("[id*='SpeedCameraCheckbox']").parentElement.parentElement.parentElement.style.display="none"


This of course assumes that the average speed controls will always be shown whenever a segment is selected - you may want to test the querySelector() return value before backtracking up the parentElement hierarchy...

If the performance hit of performing a querySelector() lookup on the entire document is too much to stomach, and if you don't mind introducing an additional thing for Waze to quietly break with another of their pointless behind the scenes element naming tweaks, then the scope of the lookup can be restricted to just the edit panel:

Code: Select all
document.getElementById('segment-edit-general').querySelector("[id*='SpeedCameraCheckbox']").parentElement.parentElement.parentElement.style.display="none"


Same caveat regarding testing the return value applies here... On my work PC - hardly a paragon of performance, especially since it got lumbered with the Windows 10 virus - the latter method runs in around 110us versus around 700us for the former.
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v1.4 -- 2016-07-12

Postby Twister-UK » Sat Jul 16, 2016 2:10 pm

I'm not sure the disappearing dates issue is entirely due to WMEFU - in WME Production I'm not seeing any dates on URs even if I disable all scripts. I've also loaded WME into a private browsing window to avoid any cookie/localstorage conflicts, and even there I'm not getting any dates. OTOH, WME Beta in Firefox displays dates just fine, even if I've got every single WMEFU option ticked...

Chrome on the other hand displays the dates just fine in both Prod and Beta, so if you're using WMEFU there then it may be helping to expose whatever it is within the WME code that's causing the problem in Firefox.
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

Re: [Script] WME Fix UI v1.5 -- 2016-07-26

Postby Twister-UK » Sat Oct 01, 2016 9:01 am

Sebiseba wrote:Hummm... at home Fix UI works well. I have Satellite Imagery.
It's very strange. So I said nothing :?


If you're having problems with WME on a work PC but not on your own PC, it may be down to whatever over-zealous security software is running on your employers network - since our last major security update occured a few months ago I've been seeing the same sort of sluggish behaviour on my work PC with pretty much every website or web-served resource I now use.
Twister-UK
Waze Local Champs
Waze Local Champs
 
Posts: 3683
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 601 times
Been thanked: 3461 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: BellHouse, bz2012, F3fall, Google [Bot], Poelpetater