[Script] UROverview Plus v3.102 (20170316)

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

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] UROverview Plus v3.21 (20140922)

Postby Twister-UK » Sat Sep 27, 2014 3:17 am

That UR has been submitted with the following fragment of HTML in both the .description and .guestUserName properties:

Code: Select all
""><img/<!--/src="javascript&colon;alert&lpar;1&rpar;" onerror=alert(1)//-->


When URO+ (or LMUR, for that matter) builds the popup for this UR and copies in the description text, the embedded javascript runs and causes the alert box to appear... I've now updated both URO+ and LMUR to remove HTML from these properties before displaying them in the popup.
Twister-UK
Area Manager
Area Manager
 
Posts: 2536
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 370 times
Been thanked: 2188 times

Re: [Script] UROverview Plus v3.21 (20140922)

Postby Szata76 » Fri Sep 26, 2014 6:50 pm

URO_bug_URfromLM.jpg
(121.48 KiB) Downloaded 612 times

I get this when I hover over an UR via LiveMap.
Szata76
Waze Global Champs
Waze Global Champs
 
Posts: 1655
Joined: Fri Jun 10, 2011 5:07 pm
Location: EU, Hungary, Budapest
Has thanked: 307 times
Been thanked: 484 times

Re: [Script] UROverview Plus v3.21 (20140922)

Postby Twister-UK » Thu Sep 25, 2014 6:15 am

Thanks, that confirms what I suspected would be the reason for it. Given this fix was implemented in the first place, there must have been situations when TB *did* alter the layer indices, and if that's still true then the fix needs to stay in place.
Twister-UK
Area Manager
Area Manager
 
Posts: 2536
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 370 times
Been thanked: 2188 times

Re: [Script] UROverview Plus v3.21 (20140922)

Postby doctorkb » Thu Sep 25, 2014 2:54 am

This is what TB has to say about it, including comments:
Code: Select all
// URO+ gets layer indexes, and if for any reason we change this order,
// it makes errors. So let's reload it.
if (typeof uroWazeBits !== "undefined"){
   console.log("WME Toolbox: URO+ detected. Reloading it to avoid layer issues.");
   uroWazeBits();
}
doctorkb
Coordinators
Coordinators
 
Posts: 4045
Joined: Wed Nov 04, 2009 9:17 am
Location: Edmonton, Alberta, Canada
Has thanked: 620 times
Been thanked: 1603 times

Re: [Script] UROverview Plus v3.21 (20140922)

Postby Twister-UK » Wed Sep 24, 2014 10:17 pm

doctorkb wrote:Does TB's calling of uroWazeBits() make sense? Should we remove that from TB to avoid future issues?


I recall there was some problem a while ago where having URO+ and TB installed would cause WME to misbehave and that TB was tweaked to fix this, so I'd hazard a guess that the uroWazeBits() call is related to this fix, however as I was unaware until these past few days that TB has been making this call, I don't know for certain why it's doing it, when it started doing it, or whether removing it would cause a problem.

Based on the comment added to the console log when TB calls the function, it's something to do with layers, and since the only thing uroWazeBits() does in relation to layers is to get the layer indices for all the layers URO+ later uses, I'd suspect that having TB installed as well has (or had) the potential to alter the layer indices, such that when URO+ then came to try accessing a layer using the previously stored index, that index was now pointing to a different layer.

However, looking at the layer indices listed in the console by URO, I can't see any changes between those listed during the initial function call and those listed following the TB-initiated call, so it may be that further changes in TB and/or WME have rendered this fix redundant.


In short: I don't know for certain why TB is making that call or whether it's still required, but since it now seems that having it make that call is no longer an issue, I'd suggest leaving it alone for now.
Twister-UK
Area Manager
Area Manager
 
Posts: 2536
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 370 times
Been thanked: 2188 times

Re: [Script] UROverview Plus v3.21 (20140922)

Postby voludu2 » Wed Sep 24, 2014 8:43 pm

Is there a check that can be done to check if the call has already been made? And then only make it if needed?
voludu2
Map Editor - Level 5
Map Editor - Level 5
 
Posts: 2402
Joined: Thu Jul 24, 2014 12:33 pm
Location: Chester County, Pennsylvania
Has thanked: 498 times
Been thanked: 754 times

Re: [Script] UROverview Plus v3.21 (20140922)

Postby doctorkb » Wed Sep 24, 2014 6:50 pm

Does TB's calling of uroWazeBits() make sense? Should we remove that from TB to avoid future issues?
doctorkb
Coordinators
Coordinators
 
Posts: 4045
Joined: Wed Nov 04, 2009 9:17 am
Location: Edmonton, Alberta, Canada
Has thanked: 620 times
Been thanked: 1603 times

Re: [Script] UROverview Plus v3.21 (20140922)

Postby Twister-UK » Tue Sep 23, 2014 1:44 pm

Twister-UK wrote:I describe it as an "attempt" only because I don't understand why having WMETB installed is causing the issue


Having spent some more time observing the interaction between URO+ and WMETB, the source of the original problem has now been identified... If WMETB starts up after URO+, it calls the uroWazeBits() function (which URO+ has already called by this point as part of its own startup procedure) to reinitialise the layer indices used by URO+. Previous to 3.20, calling this function twice wasn't an issue.

As of 3.20 however, uroWazeBits() also initialises the window.confirm() interceptor code, required by the "inhibit pending questions prompt" option. The way this code was written in 3.20 worked just fine provided it was called once. The JS environment provided by Firefox also coped quite nicely with the code being called multiple times, however the JS environment provided by Chrome was somewhat less tolerant of multiple calls. And by somewhat less tolerant what I actually mean is completely and utterly intolerant, to the point of throwing a hissy fit as soon as the intercepted confirm() function was called for the first time...

The fix I put in to 3.21 was simply to rewrite the interceptor code in a style which seemed to meet the general Google consensus on how this sort of code ought to be written, which conveniently allows the code to be called multiple times without ill-effect. So I think it's safe to upgrade 3.21 from being an "attempt" at a fix to being an actual fix.
Twister-UK
Area Manager
Area Manager
 
Posts: 2536
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 370 times
Been thanked: 2188 times

Re: [Script] UROverview Plus v3.21 (20140922)

Postby Twister-UK » Mon Sep 22, 2014 1:11 am

3.21 is an attempt to address the compatibility issue with WME Toolbox. I describe it as an "attempt" only because I don't understand why having WMETB installed is causing the issue, and although 3.21 no longer appears to cause problems there's always the possibility it still exists in some unusual cases I haven't seen during testing...


Firefox+Greasemonkey version: https://greasyfork.org/scripts/1952-uroverview-plus-uro
Chrome Web Store version: https://chrome.google.com/webstore/deta ... mjcdghdphi
Twister-UK
Area Manager
Area Manager
 
Posts: 2536
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 370 times
Been thanked: 2188 times

Re: [Script] UROverview Plus v3.20 (20140917)

Postby doctorkb » Fri Sep 19, 2014 10:16 pm

This has been identified and Twister has responded in the Toolbox thread.

There are some clear problems with the new pop-up suppression code, but due to a family emergency, Twister won't be able to address them immediately.
doctorkb
Coordinators
Coordinators
 
Posts: 4045
Joined: Wed Nov 04, 2009 9:17 am
Location: Edmonton, Alberta, Canada
Has thanked: 620 times
Been thanked: 1603 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: laurenthembprd