pvds on MM:

As a TA I use the discussions tab on WebLab a lot, which works great. There are also some labs that have ‘lab sessions’ where we are online to answer questions. Some of those labs are more quiet than others, so I’m not checking the discussions page all the time.

Would it be possible to prepend the number of pending discussions to document.title, sort of like Slack and Mattermost do? Adapting the current implementation might be a bit hacky though. If it’s not possible, then by all means ignore this request :slightly_smiling_face:

Tried some stuff, it might be possible to add this to the end of the table refresh function. Warning: it’s hacky as heck :innocent:

var numberOfPending = $("table:visible tbody").find('tr:not(.comment-answered)').length;
document.title = "(" + numberOfPending + ") " + document.title.match(/(\(\d+\)\s+)?(.+)/)[2];

The regex matching cuts of the part between parentheses so it’s always reset properly.

Submitted by Elmer van Chastelet on 8 September 2020 at 15:08

On 29 September 2020 at 08:17 Elmer van Chastelet removed tag 48.38

On 29 September 2020 at 08:17 Elmer van Chastelet tagged 48.48

Log in to post comments