Skip to content

Instantly share code, notes, and snippets.

@lukemayes
Last active December 23, 2015 08:29
Show Gist options
  • Save lukemayes/6608280 to your computer and use it in GitHub Desktop.
Save lukemayes/6608280 to your computer and use it in GitHub Desktop.
Highlight any participants that have not yet estimated on planningpoker.com.
<!DOCTYPE html>
<html>
<!--
(function() {
var _ = function(selector) {
return [].splice.call(document.querySelectorAll(selector), 0);
};
var participants = _('#participants > li');
var doneParticipants = _('.open .estimate .label').map(function(it) { return it.innerHTML.replace(/\s/g, ''); });
var isFinished = function(name) {
return doneParticipants.filter(function(it) {
return it === name;
}).length;
};
var notDone = participants.filter(function(it) {
return !isFinished(it.childNodes[2].data.replace(/\s/g, ''));
});
notDone.forEach(function(it) {
it.style.backgroundColor = "#A02424";
});
}())
-->
<head></head>
<body>
<a href="javascript:(function()%20%7Bvar%20_%20=%20function(selector)%20%7Breturn%20[].splice.call(document.querySelectorAll(selector),%200);%20%7D;%20var%20participants%20=%20_('%23participants%20%3E%20li');%20var%20doneParticipants%20=%20_('.open%20.estimate%20.label').map(function(it)%20%7B%20return%20it.innerHTML.replace(/%5Cs/g,%20'');%20%7D);%20var%20isFinished%20=%20function(name)%20%7Breturn%20doneParticipants.filter(function(it)%20%7Breturn%20it%20===%20name;%20%7D).length;%20%7D;%20var%20notDone%20=%20participants.filter(function(it)%20%7Breturn%20!isFinished(it.childNodes[2].data.replace(/%5Cs/g,%20''));%20%7D);%20notDone.forEach(function(it)%20%7Bit.style.backgroundColor%20=%20%22%23A02424%22;%20%7D);%20%7D())">Finish Already!</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment