8bit @8bit

idea: wasteof.notifier extension

scratch notifier but for wasteof

Apr 14, 2022, 1:52 PM
2
View all

comments

Highlighted comment
async function setup() {
  await Notification.requestPermission();
}
function checkForNewMessages() {
  const notifsCount = document.getElementsByClassName('absolute flex bg-red-500 text-white text-xs content-center justify-center items-center p-2 h-4 rounded-md')[0].innerText

  if (typeof notifsCount !== 'undefined') {
    if (notifsCount !== prevCount) {
      const notify = new Notification('new messages on wasteof.money')
      prevCount = notifsCount
    }
  }
}
setup()
setInterval(checkForNewMessages, 60000)

maybe ill do that, and use your wasteof client too