diff --git a/tdx-enhanced.js b/tdx-enhanced.js index 9fd933e..3a7e83c 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -206,6 +206,22 @@ } } + //highlight modified/age red + if ('LastModifiedDate' in item) { + let modDate = item.LastModifiedDate + const ageThreshold = 336 + + let date = moment(modDate.txt) + let duration = moment.duration(moment().diff(date)) + let hours = duration.asHours() + + let alpha = hours / ageThreshold + + let cell = modDate.cell + cell.style.background = `rgba(255,0,0,${alpha}` + cell.classList.add(alpha > 0.5 ? "light" : "dark") + } + //find user replies & last modified by internal if ('CustomerName' in item && 'LastModifiedByFullName' in item && 'ResponsibleFullName' in item) { let fromUser = item.CustomerName