[Script] WME Chat addon

open the console log (Ctrl-Shift-J) and try to find an error related to chat addon: click on the link on the right of the error message and look at the script source. You can also click on the small triangle on the left of the error message to drop down the call stack of function, and copy-paste it in a PM.
All logs of chat addon are prefixed by “Chat addon v” followed by the version number. You can use filters to display only those messages, but this will hide error messages.

I want to specially thank the author of the script for working together with me via PMs.
He gently pointed out the lack of a message showing Tampermonkey was running.

The problem was, of course, a ‘loose nut on the keyboard’.
Somehow Tampermonkey had gotten ‘turned off’ (red X by the ‘Enabled’ rather than a green check).

I want to report a conflict between this and another script. I am posting this in the thread for both scripts.

When using WME Chat addon simultaneously with WME House Number Helper (Eng. v.) I see this issue. The issue goes away when I disable WME House Number Helper.

When I click the Permalink+ icon in WME Chat addon, the message gets filled with javascript:; instead of the Permalink.

Hi, I’m the author of the other conflicting script. It is likely that the problem is caused by my script because from the last WME version I had to prepend my button to the permalink bar instead of appending it (otherwise it won’t be shown by the latest version of WME).

Toolbox had exactly the same problem, the solution is to retrieve the permalink using the following code:

$('.WazeControlPermalink a.icon-link')[0].href;

I will be thankful if you can upgrade your script accordingly.

Ok, it will be fixed in next version.

@bedo2991, I insert a div after the original waze permalink in my script fancy permalink, and it works fine. I don’t understand your issue.

V0.6:

auto update seems not to work properly. You can try to force update in tampermonkey of greasemonkey and let me know if it works. Else, you should manually update the script by clicking the ‘install this script’ button on the greasyfork script web page…

  • bugfix: bad permalinks are not converted to targets

  • bugfix: compatibility with WME House number helper

  • added smileys: ^^ , :S , oO

  • TTS:

  • default is disabled

  • go in settings to enable it

  • change the language from ‘en’ to your language:

  • To get a valid language code, go to translate.google.com

  • type a word to translate

  • choose a language

  • if you can see a speaker icon at the bottom right of the text area, it means that this language is supported for TTS

  • look at the address bar: you should see: https://translate.google.com/#fr/en/ where your language code is between the # and the next /

  • use this code in chat addon

  • change the ‘from username’ to a custom string in your language

  • change the ‘link to’ to a custom string in your language

  • known bug: the second consecutive message of a user that posts duplicated messages is not ‘TTSed’

  • Match pattern improved: set a word between two ‘$’ to match the exact word. Eg: ‘$bob$’ will not alert on ‘bobbie’

  • System messages (…has joined …has left) are better managed: if a second message is posted by the same publisher after system messages, the second message appears as a new message under system messages. (before it was glued to the last message from the same publisher, over system messages)

I really really love this script, finally someone has made the chat really useful! Waze should simply integrate this into WME!

It would be nice if there was a way to PREVENT ‘spawned WME session’ windows from picking up the TTL configuration of the ‘primary WME session’ window.
The TTL ‘echo’ when I open a second window, to work on a specific UR, without losing track of where I am in ‘scanning’ my work area for new URs, is something I can live without. :slight_smile:

I think a great new addition would be a little colored circle next to each persons name in the chat room, which would display if they are active.

Green ball would be ‘Active’
Yellow ball with a clock would mean Inactive for last 5(?) mins (not typing/moving mouse).
Yellow ball would mean short term AFK
Red ball is for a long term AFK.
Red ball with a clock would mean Inactive for last 30(?) mins (not typing/moving mouse).
Perhaps a grey ball for a Do Not Disturb?

People can select if they want to be either green/yellow/red/grey, only the clock ones arnt set by the user.

This would allow users to easily see if a person is online. As a noob to WME, I ask for tips and guidance a lot, and this would be more effective than going down the list saying “@User hello. @User you there? @User can you help me out for a sec?” etc. and just ask a person who is green.

I agree this would be very helpful, but I am not sure if this is easily done. Your WME can only display (also in scripts) the information it makes available. How should your WME know which user is active or afk? This would mean that the chat addon instance of each user regularly has to report its active status to some central server, which then distributes this information back to all other users.

Recently there have been a lot of chat messages in the US coming from other countries. While the addon is great at hiding them, I was wondering how hard would it be to stop the “new messages” bar which comes across the bottom of the chat frame from incrementing the count for messages which are not displayed because they are from a different room?

While we are on the topic of the “new messages” bar, is it possible to change to width of that bar so it doesn’t overlay the down arrow of the scroll bar. Currently if I’m scrolling down slowly through missed messages and a new message arrives, I inadvertently press the “new message” alert bar and scroll all the way to the bottom, when I was trying to click the down arrow.

ok,grouped answer:

  • Echo on sound with more than one tab: I will look what I can do (hard to detect a rough shutdown of the ‘main’ tab…)
  • Status color: with the bell, I have not a lot of space to add something, and I ‘must’ already add a button to add the user in a favorite list, and play a different sound when this user post a message.
    For choosing the status, as BellHouse said, the information must be uploaded to a server, so this is possible but very heavy to implement (and I haven’t got a server).
    So, I just test something: I colored the bell from green to yellow (30 sec) the from yellow to red (30 sec) if the user didn’t move. It works fine! But this is linked to the movement of the user’s map. This doesn’t mean that the user will look at the chat, but it means that the user has activity on WME. I can link it to the time of last message posted by the user? But in this case, you have just to look in messages who is talking recently… And if no one is talking in the chat, everyone will be red, but some can answer :? I think the ‘WME activity’ is good enough. let me know what you prefer.
  • New message bar: ok for users not in the room and reducing width.

Thank you VERY much, this is all great work, and we all REALLY appreciate it. This is one of the most frequently recommended scripts I see in the chat.

About the status color, I think the best idea (lacking a frequently updated server) is using to the WME. I agree using the previous chat messages would be redundant, we can easily see who is active in a conversation (especially with the time-stamps you provide).

However I wonder, would that user have to be located on or near your screen view for the addon to know they moved, or is the target link for each user automatically updated on the fly so that movement information is already readily available to the script? I only ask because I’m concerned, while I like to see this new feature, I wouldn’t want it to be one which a resource drain to WME.

It is the position (lon/lat) of the screen center of the user. This is given in real time by WME, but there is no event I can catch on it. So I look at a change every second. It is a very light function.

For the color, I can test the last move (every second) and the last message (at each post, so lighter), and take the most recent. So, every one will be happy :wink:

v0.7

  • bells colored regarding user activity:

  • from green to yellow to red: 5 mins

  • back to green when message posted

  • back to green when user moves

  • bell changes to Zzz icon if no activity for 20 mins

  • “new messages” bar length reduced to access to the scroll button

  • bugfix on alert keyword inside link

Great stuff!!
Suggestion: Now you have the active status being reported, if it’s not difficult, maybe you’d want to add a option for the username sort to be by active status. It would list all green on top, … all Zzz on bottom. It could even be done as a checkbox instead of a standard option, to allow a two category sort, so all green on top, then sorted by the selcted method (rank, name…) within the green.

As always thanks for this great script, I continue to recommend it to everyone.

I discovered another bug, I son’t think it’s new, but it should be easy too fix.

Smiley codes are being converted to images inside URL strings. A URL to https://wiki.waze.com/wiki/User:PesachZ instead displays as
esachZ/Wayfinders">https://wiki.waze.com/wiki/User :stuck_out_tongue: esachZ/Wayfinders
and links to https://wiki.waze.com/wiki/User<img%20title=

This should be easy to fix as your code is already able to isolate alert keywords from within a url string. Thanks again

hi all, … or PesachZ :wink:

sort by activity, grouped, and secondary sort in each group is in beta tests.
Smiley inside links too.
Still working on other requests…

Thanks d2 :wink:

v0.8

  • bugfix while selecting data after click on a permalink:
  • after WME loads data, or after some seconds, the chat addon will try to select data
  • if data is not available (not loaded yet, or element has been deleted), chat addon will ask you to try again
  • Sort on activity (enable it in settings). Users are grouped, and secondary sort is used inside each group
  • User sort is disabled when the mouse is over the user list. This avoids a click on the wrong user
  • bugfix on color fade of bell
  • bells replaced by chips when invisible
  • bugfix: smiley inside a link
  • tool tip text on permalink to show how many elements and what kind of element (segment, node, venue) are supposed to be seleted