September 17, 2015

Yammer Inbox: Mark All as Read

Problem

Cannot “mark all as read” in Yammer inbox.

Workaround

Took Nate Haug’s script here, and modified it slightly to work with current version of Yammer. You need to execute the following script in Chrome or Firefox (Firebug) / Safari JavaScript console:
  1. Press F1 to open developer tools
  2. Select Console
  3. Paste in the following code and press Enter (after script has finished, restart browser).
var yamTime = 1000;
var goBack = function() {
    history.back();
    setTimeout(clickLink, yamTime);
}
var clickLink = function() {
  var $element = jQuery('.yj-inbox-list--messages li:first a');
  var $moreLink = jQuery('#moreButton button');
  if ($element.length) {
    $element.click();
    setTimeout(goBack, yamTime);
  }
  else if ($moreLink.length) {
    $moreLink.click();
    setTimeout(clickLink, yamTime);
  }
}
clickLink();


NOTE! If you have slow connection you might run into errors when Inbox doesn’t have time to refresh properly and you’re stuck in a loop with one same item, please increase yamTime value.

NOTE! You might need to run the script few times, and click the “More items” link on Yammer page to show rest of the items.

Solution

No worries, real solution is just around the corner:

No comments:

Post a Comment