Skip to content
This repository was archived by the owner on Aug 24, 2025. It is now read-only.

Commit 59021e2

Browse files
committed
use blur event instead of interval
1 parent 02d7c58 commit 59021e2

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

addon.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "fixavatars",
33
"name": "FixAvatars",
4-
"version": "1.0.0",
4+
"version": "1.1.0",
55
"inject": "index.html",
66
"injection_point": "HEAD",
77
"inject_at": "TAIL",

src/main.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,4 @@ function fixAvatars() {
1414
});
1515
}
1616

17-
// Interval because of new avatars being added to the DOM (e.g. new friend added or new group joined)
18-
setInterval(fixAvatars, 5000);
19-
20-
// Timeout to make sure avatars are loaded before fixing them. If your PC is too slow the interval above will fix them anyway.
21-
setTimeout(fixAvatars, 1000);
17+
window.addEventListener("blur", fixAvatars);

0 commit comments

Comments
 (0)