|
|
@@ -1,8 +1,12 @@ |
|
|
|
function {{JS_PREFIX}}_apply_blocks(blocked_users) { |
|
|
|
const commentTable = document.querySelector('table.comment-tree'); |
|
|
|
let commentTable = document.querySelector('table.comment-tree'); |
|
|
|
if (commentTable === null) { |
|
|
|
console.warn('commentTable not found, not filtering'); |
|
|
|
return; |
|
|
|
console.warn('commentTable not found, looking for hnmain table'); |
|
|
|
const commentTable = document.querySelectorAll('#hnmain tbody'); |
|
|
|
if (commentTable === null) { |
|
|
|
console.warn('commentTable not found and hnmain table not found, not filtering'); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
const comments = commentTable.querySelectorAll('tr'); |
|
|
|
if (comments === null || comments.length === 0) { |
|
|
|