Ver a proveniência

fix HN user blocking on threads page

tags/v0.7.0
Jonathan Cobb há 4 anos
ascendente
cometimento
b5f4e1f944
1 ficheiros alterados com 7 adições e 3 eliminações
  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 Ver ficheiro

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


Carregando…
Cancelar
Guardar