Browse Source

fix HN user blocking on threads page

tags/v0.7.0
Jonathan Cobb 4 years ago
parent
commit
b5f4e1f944
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      bubble-server/src/main/resources/bubble/rule/social/block/site/HackerNews.js.hbs

+ 7
- 3
bubble-server/src/main/resources/bubble/rule/social/block/site/HackerNews.js.hbs View File

@@ -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) {


Loading…
Cancel
Save