Sfoglia il codice sorgente

fix HN user blocking on threads page

tags/v0.7.0
Jonathan Cobb 4 anni fa
parent
commit
b5f4e1f944
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  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 Vedi 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) {


Caricamento…
Annulla
Salva