diff --git a/bubble-server/src/main/resources/bubble/rule/social/block/site/HackerNews.js.hbs b/bubble-server/src/main/resources/bubble/rule/social/block/site/HackerNews.js.hbs index 622a0d8b..5ac48c37 100644 --- a/bubble-server/src/main/resources/bubble/rule/social/block/site/HackerNews.js.hbs +++ b/bubble-server/src/main/resources/bubble/rule/social/block/site/HackerNews.js.hbs @@ -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) {