Skip to content

Instantly share code, notes, and snippets.

@rheid
Created July 1, 2015 10:32
Show Gist options
  • Save rheid/bdfa681a91d8303b5e18 to your computer and use it in GitHub Desktop.
Save rheid/bdfa681a91d8303b5e18 to your computer and use it in GitHub Desktop.
clear all yammer messages
var goBack = function() {
history.back();
setTimeout(clickLink, 400);
}
var clickLink = function() {
var $element = jQuery('.yj-unread-item a:first');
var $moreLink = jQuery('#moreButton button');
if ($element.length) {
$element.click();
setTimeout(goBack, 400);
}
else if ($moreLink.length) {
$moreLink.click();
setTimeout(clickLink, 1000);
}
}
clickLink();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment