Get a sneak peek at whats next for Permanent Hazards on our April 7th Office Hours!
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.

Locked
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.

[SCRIPT] DrivesTabEnhancer v0.6 (Obsolete)

Post by Twister-UK
Please Note...
The functionality of this script has now been integrated into the URO+ script, and this standalone version is no longer supported.




This is a quick dust-down of an old script I started writing a little over a year ago but abandoned due to a lack of understanding how WME was behaving behind the scenes. With an extra years-worth of experience poking around in the WME code, and spurred on by a chance comment elsewhere in the forums, here's a version which now works more or less as originally planned...


So, what does it actually do? Simply, it modifies the Drives tab in the standard WME UI so that, on the first page of results, it shows the drive summaries for every drive in the user history which is fully available, as opposed to just the first 5 drives in their history.

This means that, when the user clicks on the summary for any drive on that first page, WME will then display the drive trail on the map. Any drive not shown on that first page is then only available as a summary - based on the behaviour of my own Waze account, it appears that full histories are only available for the past 2 weeks-worth of drives.

By placing all the fully-available drives on the first page of the tab, it both serves to indicate which drives are fully-available for viewing and also reduces the number of pages on the tab, minimising the number of clicks required to search back through the summaries.


Note that due to the weird URL-redirection-juju going on in WME beta, I haven't enabled beta support in this script yet...



Firefox+Greasemonkey version: http://userscripts.org/scripts/show/176855
Chrome packaged version: http://crx.chizzum.com/DriveTabEnhancer.crx
Twister-UK
Waze Local Champs
Waze Local Champs
Posts: 4671
Answers: 2
Answers: 2
Has thanked: 736 times
Been thanked: 4687 times

POSTER_ID:16778143

1

Send a message
Last edited by Twister-UK on Thu Feb 06, 2014 5:33 pm, edited 7 times in total.
Chris (not to be confused with Chris or Chris, or even Tim, Stu, or any of the other champs team...)
AM SE England & Shetland Islands, UK Local Champ, WME Beta Tester & ScriptMangler
WME/Livemap enhancement scripts @ GreasyFork


https://chizzum.com/greasemonkey/images/beta.pnghttps://chizzum.com/greasemonkey/images/s0400.pnghttps://chizzum.com/greasemonkey/images/c5s.png

Post by paulkok_my
It's not working for me on the public editor. I get this message "Error finding your drives, please try again later."

If I disable it, I can see my drive.
paulkok_my
Waze Global Champs
Waze Global Champs
Posts: 1593
Has thanked: 218 times
Been thanked: 235 times
Send a message

Post by paulkok_my
Twister-UK wrote:Sounds like it isn't finding any fully available drives for you, which either means there's a URL problem similar to the one I had in WME beta, or you haven't recorded any drives in the past few weeks.

With the script disabled, does WME display a route when you click on the first drive listed in the tab?

If it does, with the script still disabled please can you have a look in the Firebug window or Chrome javascript console when you click on the Drives tab for the first time (or click on one of the page numbers at the end of the tab to show a different set of drives), and let me know which URL is being requested by the tab. On my setup it looks like this:

Code: Select all

https://world.waze.com/Descartes-live/app/Archive/List?minDistance=1000&offset=0&count=5
Thanks
I hope I got it right. With the script disabled, I got this:

Code: Select all

https://world.waze.com/Descartes-live/app/Archive/List?minDistance=1000&offset=0&count=5
With the script enabled, I got this:

Code: Select all

GET https://world.waze.com/Descartes-live/app/Archive/List?minDistance=1000&offset=0&count=108 406 (Not Acceptable) 
https://world.waze.com/Descartes-live/app/Archive/List?minDistance=1000&offset=0&count=108
paulkok_my
Waze Global Champs
Waze Global Champs
Posts: 1593
Has thanked: 218 times
Been thanked: 235 times
Send a message

Post by paulkok_my
Wildcard_25 wrote:Getting the same message as paulkok_my with DTE.

Here are the relevant parts of the log.

Code: Select all

DriveTabEnhancer: requesting https://world.waze.com/Descartes-live/app/Archive/MyList?minDistance=1000&offset=70&count=5 dte_0.1.user.js:31
DriveTabEnhancer: received 5 drives dte_0.1.user.js:31
DriveTabEnhancer: 74 drives in history dte_0.1.user.js:31
GET https://world.waze.com/Descartes-live/app/Archive/List?minDistance=1000&offset=0&count=74 406 (Not Acceptable) OL-5fc3da5c.js:13
And, yes, all 74 display a route when clicked on, 75th and older don't :)
At least you can see 74 drives in history. I don't get to see any drives except "Error finding your drives, please try again later.'
paulkok_my
Waze Global Champs
Waze Global Champs
Posts: 1593
Has thanked: 218 times
Been thanked: 235 times
Send a message

Post by paulkok_my
Twister-UK wrote:Tweaked the code to respect the 50 drives per page limit imposed by WME...

Firefox+Greasemonkey version: http://userscripts.org/scripts/show/176855
Chrome packaged version: http://crx.chizzum.com/DriveTabEnhancer.0.2.crx
+1

It's working now. Thanks :D
paulkok_my
Waze Global Champs
Waze Global Champs
Posts: 1593
Has thanked: 218 times
Been thanked: 235 times
Send a message

Post by paulkok_my
OyyoDams wrote:Hi,

I can't get it to work in the beta editor (left panel goes blank).
If not mistaken it's mentioned in the first post that it does not support the beta editor.
paulkok_my
Waze Global Champs
Waze Global Champs
Posts: 1593
Has thanked: 218 times
Been thanked: 235 times
Send a message

Post by paulkok_my
Szata76 wrote:Hi!

Your extension is very useful but from today it doesn't work. If it is enabled it sometimes hide all WME tabs.
I'm not sure whether it's caused by this script but my work around is to zoom in, click on a segment and then click else where and the wme tabs are back. :D

Sent from my GT-I9300 using Tapatalk
paulkok_my
Waze Global Champs
Waze Global Champs
Posts: 1593
Has thanked: 218 times
Been thanked: 235 times
Send a message

Post by Szata76
Hi!

Your extension is very useful but from today it doesn't work. If it is enabled it sometimes hide all WME tabs.
Szata76
Waze Global Champs
Waze Global Champs
Posts: 1711
Has thanked: 251 times
Been thanked: 479 times
Send a message

Editor level: 6;
Area: Magyarország / Hungary ● Corfu (GR)
facebook.com/waze.hu

Post by Szata76
paulkok_my wrote:
Szata76 wrote:Hi!

Your extension is very useful but from today it doesn't work. If it is enabled it sometimes hide all WME tabs.
I'm not sure whether it's caused by this script but my work around is to zoom in, click on a segment and then click else where and the wme tabs are back. :D

Sent from my GT-I9300 using Tapatalk
Ok thanks for this solution, but why did it stopped working now? I can see only 5 drives on a page.
Szata76
Waze Global Champs
Waze Global Champs
Posts: 1711
Has thanked: 251 times
Been thanked: 479 times
Send a message

Editor level: 6;
Area: Magyarország / Hungary ● Corfu (GR)
facebook.com/waze.hu

Post by Twister-UK
Sounds like it isn't finding any fully available drives for you, which either means there's a URL problem similar to the one I had in WME beta, or you haven't recorded any drives in the past few weeks.

With the script disabled, does WME display a route when you click on the first drive listed in the tab?

If it does, with the script still disabled please can you have a look in the Firebug window or Chrome javascript console when you click on the Drives tab for the first time (or click on one of the page numbers at the end of the tab to show a different set of drives), and let me know which URL is being requested by the tab. On my setup it looks like this:

Code: Select all

https://world.waze.com/Descartes-live/app/Archive/List?minDistance=1000&offset=0&count=5
Thanks
Twister-UK
Waze Local Champs
Waze Local Champs
Posts: 4671
Answers: 2
Has thanked: 736 times
Been thanked: 4687 times
Send a message
Chris (not to be confused with Chris or Chris, or even Tim, Stu, or any of the other champs team...)
AM SE England & Shetland Islands, UK Local Champ, WME Beta Tester & ScriptMangler
WME/Livemap enhancement scripts @ GreasyFork


https://chizzum.com/greasemonkey/images/beta.pnghttps://chizzum.com/greasemonkey/images/s0400.pnghttps://chizzum.com/greasemonkey/images/c5s.png