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 Reply
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] WME Clear Feed

Post by vaindil
I like the feed, but sometimes if I've been away a little too long the feed gets out of control. This adds a small link to your feed that allows you to clear it.

Specifically, this will clear any feed items currently on the screen, then load the next set, clear the screen, etc. until all items are cleared. Once it's finished, it will display the total number of items that were deleted.

Download here!
vaindil
Posts: 126
Has thanked: 11 times
Been thanked: 79 times

POSTER_ID:17115814

1

Send a message
Last edited by vaindil on Sat Jan 11, 2020 8:59 pm, edited 3 times in total.

Post by vaindil
RussPA wrote:At some point after about 10 or so feed refills, it stops and I get about 40 of these in the console: Failed to load resource: the server responded with a status of 429 () /Descartes/app/Feed/Issues/UPDATE_REQUEST/8720282:1

Or this: DELETE https://www.waze.com/Descartes/app/Feed ... ST/8719096 429 app-75b9047afacbd6b7b171.js:1
If I click Clear Feed, it continues. Once I got 999 cleared, clicked the button again and got 161 cleared, the got 253 cleared. Feed seems to refill as fast as it empties.
It's being rate limited, the server doesn't like so many requests being sent so quickly. I've never had that many entries in my feed so I can't really test that.

Script is updated with a timer that should hopefully resolve this, but since I have no real way of testing I can't know for sure. If people could report back and let me know I would greatly appreciate it!
vaindil
Posts: 126
Has thanked: 11 times
Been thanked: 79 times
Send a message

Post by vaindil
RussPA wrote:If it's no big deal, then sure that would be fine. Thanks!
Just updated, the success message at the end will now display the total number of cleared items. Let me know if that works for you.
vaindil
Posts: 126
Has thanked: 11 times
Been thanked: 79 times
Send a message

Post by vaindil
RussPA wrote:Yea, I was just curious. For people who have a large area, like an entire state or country it might be interesting to see how many feed items they have, like is it in the hundreds or thousands, but not worth any trouble.
It would be trivial for me to add that, but it could only display after you clear the feed. Would you like that?
vaindil
Posts: 126
Has thanked: 11 times
Been thanked: 79 times
Send a message

Post by vaindil
RussPA wrote:Just curious, is there a way to know how many items are in the feed?
Just checked, the API doesn't send the total number of issues back, so there's no way to know in advance how many there are. I could keep track of how many are cleared and display that if that's what you're asking.
vaindil
Posts: 126
Has thanked: 11 times
Been thanked: 79 times
Send a message

Post by vaindil
Just updated it for the latest WME. I will look into doing some of the other suggestions that were offered in the replies years ago, but no promises at this point.
vaindil
Posts: 126
Has thanked: 11 times
Been thanked: 79 times
Send a message

Post by vaindil
Olestas wrote:So what does it do actually? :D
I just updated the OP to explain. It clears what's currently on the screen, then reloads, clears again, reloads, etc. until everything is clear. No better way to do it that I could find, unfortunately.
vaindil
Posts: 126
Has thanked: 11 times
Been thanked: 79 times
Send a message

Post by Twister-UK
I'd only recently thought about adding this sort of functionality to the feed filter in URO+, so there's definitely a demand for it (even if that demand is only from me :D ).

The one main difference in the version I was planning to add is that mine would only clear feed entries that were still visible on screen after the feed filter settings had been applied, so that I could quickly remove entries that I really wasn't interested in (e.g. all of the ones generated by my testing AM area in Mexico) without also removing ones I wanted to deal with by hand.

Any chance you could look at modifying your script to clear only the visible feed entries, either as an option or as the default mode of operation - the only time this would kick in is if someone was using the feed filter, so to turn off the option in your script they'd just need to turn off their filter settings in mine...

One other option I'd like to see is to make the feed reload optional, and have it clear only the currently visible entries on each click.


Finally, although removing feed entries doesn't affect the map data or the user editing profile, it should still be considered a destructive act which, once initiated, cannot be undone. So I'd also recommend almost to the point of insisting on it, that you include an "are you REALLY sure you want to nuke your feed entries?" confirmation prompt just in case someone clicks the link by accident.
Twister-UK
Waze Local Champs
Waze Local Champs
Posts: 4698
Answers: 2
Has thanked: 743 times
Been thanked: 4737 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