Parcourir la source

lower logging

tags/v1.0.2
Jonathan Cobb il y a 4 ans
Parent
révision
6aa367e672
2 fichiers modifiés avec 10 ajouts et 10 suppressions
  1. +4
    -6
      bubble-server/src/main/resources/bubble/rule/social/block/JsUserBlockerRuleDriver.js.hbs
  2. +6
    -4
      bubble-server/src/main/resources/bubble/rule/social/block/site/FB.js.hbs

+ 4
- 6
bubble-server/src/main/resources/bubble/rule/social/block/JsUserBlockerRuleDriver.js.hbs Voir le fichier

@@ -67,7 +67,7 @@ function {{JS_PREFIX}}_fetch_blocks (do_apply) {
blocked_keywords[token.substring('kw:'.length)] = true;
} else if (token.startsWith('list:')) {
let list = token.substring('list:'.length);
console.log('adding list: '+list);
// console.log('adding list: '+list);
{{JS_PREFIX}}_block_list(list);
} else {
blocked_users[token] = true;
@@ -164,20 +164,20 @@ function {{JS_PREFIX}}_mark_evaluated(node) {
}

function {{JS_PREFIX}}_tally_block(name) {
console.log('tally_block: '+name);
// console.log('tally_block: '+name);
if (typeof {{PAGE_PREFIX}}_add_extra_block === 'function') {
{{PAGE_PREFIX}}_add_extra_block(name);
}
}

function {{JS_PREFIX}}_tally_allow(name) {
console.log('tally_allow: '+name);
// console.log('tally_allow: '+name);
if (typeof {{PAGE_PREFIX}}_add_extra_block === 'function') {
{{PAGE_PREFIX}}_add_extra_allow();
}
}
function {{JS_PREFIX}}_untally_allow(name) {
console.log('untally_allow: '+name);
// console.log('untally_allow: '+name);
if (typeof {{PAGE_PREFIX}}_add_extra_block === 'function') {
{{PAGE_PREFIX}}_remove_extra_allow();
}
@@ -445,14 +445,12 @@ function {{JS_PREFIX}}_show_app_details() {
entryCheckbox.checked = checked;
}
if (checked) {
console.log('checked ' + listName + ': ' + listUrl);
{{JS_PREFIX}}_block_list(listKey);
} else {
{{JS_PREFIX}}_unblock_list(listKey);
{{JS_PREFIX}}_unblocked_needs_refresh = true;
{{JS_PREFIX}}_hide_app_details();
{{JS_PREFIX}}_show_app_details();
console.log('unchecked ' + listName + ': ' + listUrl);
}
}



+ 6
- 4
bubble-server/src/main/resources/bubble/rule/social/block/site/FB.js.hbs Voir le fichier

@@ -22,9 +22,8 @@ Element.prototype.appendChild = function() {
|| (!{{JS_PREFIX}}_mobile && node.tagName.toUpperCase() === 'DIV' && node.role && node.role === 'article') ) {
const block = {{JS_PREFIX}}_should_block({{JS_PREFIX}}_blocked_users, node)
if (block) {
console.log('>>> BLOCKING via appendChild: '+block);
// console.log('>>> BLOCKING via appendChild: '+block);
return;
<!--window.setTimeout(function () { if (node.parentNode) node.parentNode.removeChild(node); node.parentNode = null; }, 3000);-->
}
}
}
@@ -185,7 +184,7 @@ function {{JS_PREFIX}}_should_block(blocked_users, article) {
// log('RE-VISITING article node for author: ' + authorName + ' (' + authorDisplayName + '), display.inner='+authorDisplay.parentNode.innerHTML);
}
let b = {{JS_PREFIX}}_create_block_control(article, authorName);
console.log('inserting span='+b.id+' for article by '+authorName);
// console.log('inserting span='+b.id+' for article by '+authorName);
authorDisplay.parentNode.appendChild(b);

} catch (e) {
@@ -193,7 +192,10 @@ function {{JS_PREFIX}}_should_block(blocked_users, article) {
}
}
}
if (firstEval) {{JS_PREFIX}}_tally_allow(firstAuthor);
if (firstEval) {
// console.log('>>> allowing post with firstAuthor = '+firstAuthor);
{{JS_PREFIX}}_tally_allow(firstAuthor);
}
return false;
}



Chargement…
Annuler
Enregistrer