mirror of
https://github.com/sagidayan/greasemonkey-scripts.git
synced 2024-11-22 09:25:26 +00:00
[BZ Fresh UI] Minor tweak in implementation.
There was no need to fetch commenst to access the headers.
This commit is contained in:
parent
1260defb5d
commit
a518799fff
1 changed files with 4 additions and 5 deletions
|
@ -83,11 +83,10 @@
|
||||||
|
|
||||||
async function formatComments() {
|
async function formatComments() {
|
||||||
log('Started');
|
log('Started');
|
||||||
const comments = [...document.getElementsByClassName('bz_comment')];
|
const headers = [...document.getElementsByClassName('bz_comment_head'),
|
||||||
comments.forEach(async comment => {
|
...document.getElementsByClassName('bz_first_comment_head')];
|
||||||
const header = comment.getElementsByClassName('bz_comment_head')[0] ||
|
log(`Found ${headers.length} headers to add avatars to`);
|
||||||
comment.getElementsByClassName('bz_first_comment_head')[0];
|
headers.forEach(async header => {
|
||||||
if (!header) return;
|
|
||||||
if ([...header.getElementsByClassName('sd_bz_user_avatar')].length) return;
|
if ([...header.getElementsByClassName('sd_bz_user_avatar')].length) return;
|
||||||
const children = [...header.children];
|
const children = [...header.children];
|
||||||
const userDataElm = children
|
const userDataElm = children
|
||||||
|
|
Loading…
Reference in a new issue