counter.js
// Update badge count based on the number in Today
Update badge count based on the number in Today
Update badge count based on the number in Today
function updateBadgeCount() {
  const count = currentCount();
  const title = titleWithoutCount();
  var newTitle = document.title;
  if (count === 0) {
    newTitle = title;
  } else if (count !== existingCount()) {
    newTitle = `${title} (${count})`;
  }
  if (document.title !== newTitle) {
    document.title = newTitle
  }
}
function updateBadgeCount ( ) { const count = currentCount ( ) ; const title = titleWithoutCount ( ) ; var newTitle = document . title ; if ( count === 0 ) { newTitle = title ; } else if ( count !== existingCount ( ) ) { newTitle = ` ${ title } ${ count } ` ; } if ( document . title !== newTitle ) { document . title = newTitle } }
Update badge count based on the number in Today
Update badge count based on the number in Today