Files
textmate/Applications/TextMate/about/js/contributions.js
2012-11-12 14:49:47 +07:00

21 lines
664 B
JavaScript

window.addEventListener("DOMContentLoaded", function() {
// attach click handler for '...' links to expand/collapse commit descriptions
var expanders = document.querySelectorAll(".commit-group-item .hidden-text-expander a");
var expand = function(event)
{
var desc = event.target.parentNode.parentNode.parentNode.querySelector('.commit-desc');
if (desc.style.display === 'block')
{
desc.style.display = 'none';
}
else
{
desc.style.display = 'block';
}
};
for (var i=0, ii=expanders.length; i<ii; i++)
{
expanders[i].onclick = expand;
}
}, false);