Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions content-script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use strict";
const mailboxRootSelector = "div[id^='primaryMailboxRoot']";

(async function () {
function loadFavicon() {
Expand Down Expand Up @@ -74,7 +75,7 @@

function countUnreadEmails() {
const nodes = document
.querySelector("div[title='Folders']")
.querySelector(mailboxRootSelector)
?.parentElement?.nextElementSibling?.querySelectorAll(
"span span span.screenReaderOnly"
);
Expand All @@ -96,7 +97,7 @@
});
}

await waitForEl("div[title='Folders']");
await waitForEl(mailboxRootSelector);
const favicon = loadFavicon();
const owaIcon = await createIconElement();
const title = document.title;
Expand Down