Explorar el Código

do not show block control for comments by a logged-in user

tags/v0.7.0
Jonathan Cobb hace 4 años
padre
commit
1f8ce7c249
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. +3
    -1
      bubble-server/src/main/resources/bubble/rule/social/block/site/HackerNews.js.hbs

+ 3
- 1
bubble-server/src/main/resources/bubble/rule/social/block/site/HackerNews.js.hbs Ver fichero

@@ -1,4 +1,6 @@
function {{JS_PREFIX}}_apply_blocks(blocked_users) {
const currentUser = document.getElementById('me');
const currentUserName = (currentUser !== null) ? currentUser.innerText : null;
let commentTable = document.querySelector('table.comment-tree');
if (commentTable === null) {
console.warn('commentTable not found, looking for hnmain table');
@@ -39,7 +41,7 @@ function {{JS_PREFIX}}_apply_blocks(blocked_users) {
i++;
} else {
const existingBlock = comment.querySelector('.bubble_block');
if (existingBlock === null) {
if (existingBlock === null && (currentUserName === null || currentUserName !== author)) {
const ageElement = comment.querySelector('.age');
const blockNode = document.createElement('span');
blockNode.className = "bubble_block";


Cargando…
Cancelar
Guardar