@@ -136,12 +136,10 @@ public class StandardAppPrimerService implements AppPrimerService { | |||||
// handle AppData callback registration with a basic driver | // handle AppData callback registration with a basic driver | ||||
final AppRuleDriver cbDriver = driver.getDriver(); | final AppRuleDriver cbDriver = driver.getDriver(); | ||||
if (cbDriver instanceof HasAppDataCallback) { | if (cbDriver instanceof HasAppDataCallback) { | ||||
log.info("_prime: AppRuleDriver ("+cbDriver.getClass().getSimpleName()+") implements HasAppDataCallback, registering: "+app.getUuid()+"/"+app.getName()); | |||||
log.debug("_prime: AppRuleDriver ("+cbDriver.getClass().getSimpleName()+") implements HasAppDataCallback, registering: "+app.getUuid()+"/"+app.getName()); | |||||
final HasAppDataCallback dataCallback = (HasAppDataCallback) cbDriver; | final HasAppDataCallback dataCallback = (HasAppDataCallback) cbDriver; | ||||
dataCallback.prime(account, app, configuration); | dataCallback.prime(account, app, configuration); | ||||
dataDAO.registerCallback(app.getUuid(), dataCallback.createCallback(account, app, configuration)); | dataDAO.registerCallback(app.getUuid(), dataCallback.createCallback(account, app, configuration)); | ||||
} else { | |||||
log.info("_prime: AppRuleDriver ("+cbDriver.getClass().getSimpleName()+") does NOT implement HasAppDataCallback, NOT registering: "+app.getUuid()+"/"+app.getName()); | |||||
} | } | ||||
for (Device device : devices) { | for (Device device : devices) { | ||||
final Set<String> rejectDomains = new HashSet<>(); | final Set<String> rejectDomains = new HashSet<>(); | ||||
@@ -162,7 +162,6 @@ if (typeof {{PAGE_PREFIX}}_icon_status === 'undefined') { | |||||
const img = document.createElement('img'); | const img = document.createElement('img'); | ||||
img.id = {{PAGE_PREFIX}}_getAppIconImgId(iconSpecs); | img.id = {{PAGE_PREFIX}}_getAppIconImgId(iconSpecs); | ||||
img.src = {{PAGE_PREFIX}}_getAppIconImgSrc(iconSpecs); | img.src = {{PAGE_PREFIX}}_getAppIconImgSrc(iconSpecs); | ||||
{{PAGE_PREFIX}}_log('screenWidth='+screenWidth); | |||||
img.width = Math.min(128, screenWidth/8); | img.width = Math.min(128, screenWidth/8); | ||||
link.appendChild(img); | link.appendChild(img); | ||||
bubbleControlDiv.appendChild(br); | bubbleControlDiv.appendChild(br); | ||||
@@ -1,3 +1,5 @@ | |||||
{{{ICON_JS}}} | |||||
let {{JS_PREFIX}}_blocked_users = {}; | let {{JS_PREFIX}}_blocked_users = {}; | ||||
let {{JS_PREFIX}}_blocked_keywords = {}; | let {{JS_PREFIX}}_blocked_keywords = {}; | ||||
let {{JS_PREFIX}}_blocked_lists = {}; | let {{JS_PREFIX}}_blocked_lists = {}; | ||||
@@ -127,7 +129,7 @@ function {{JS_PREFIX}}_handleVisibilityChange() { | |||||
function {{JS_PREFIX}}_check_stale_refresher(ev) { | function {{JS_PREFIX}}_check_stale_refresher(ev) { | ||||
if ({{JS_PREFIX}}_last_applied === null || Date.now() - {{JS_PREFIX}}_last_applied > 2*{{JS_PREFIX}}_idle_interval) { | if ({{JS_PREFIX}}_last_applied === null || Date.now() - {{JS_PREFIX}}_last_applied > 2*{{JS_PREFIX}}_idle_interval) { | ||||
{{PAGE_PREFIX}}_log('check_stale_refresher forcing refresh upon document event.type='+ev.type); | |||||
// {{PAGE_PREFIX}}_log('check_stale_refresher forcing refresh upon document event.type='+ev.type); | |||||
{{JS_PREFIX}}_refresh_blocks(); | {{JS_PREFIX}}_refresh_blocks(); | ||||
} | } | ||||
} | } | ||||
@@ -554,8 +556,8 @@ function {{JS_PREFIX}}_toggle_app_details(ev) { | |||||
{{{APPLY_BLOCKS_JS}}} | {{{APPLY_BLOCKS_JS}}} | ||||
{{{ICON_JS}}} | |||||
console.log('adding shadowban app...'); | |||||
{{PAGE_PREFIX}}_log('adding shadowban app...'); | |||||
{{PAGE_PREFIX}}_addBubbleApp({ | {{PAGE_PREFIX}}_addBubbleApp({ | ||||
jsPrefix: '{{JS_PREFIX}}', | jsPrefix: '{{JS_PREFIX}}', | ||||
app: '{{BUBBLE_APP_NAME}}', | app: '{{BUBBLE_APP_NAME}}', | ||||
@@ -100,16 +100,16 @@ function {{JS_PREFIX}}_create_block_control(article, authorName) { | |||||
return blockSpan; | return blockSpan; | ||||
} | } | ||||
const {{JS_PREFIX}}_non_authors = ['friends', 'photo', 'memories']; | |||||
function {{JS_PREFIX}}_is_author_link(href) { | function {{JS_PREFIX}}_is_author_link(href) { | ||||
const non_authors = ['friends', 'photo', 'memories']; | |||||
let h = href.startsWith({{JS_PREFIX}}_site_host) ? href.substring({{JS_PREFIX}}_site_host.length) : href; | let h = href.startsWith({{JS_PREFIX}}_site_host) ? href.substring({{JS_PREFIX}}_site_host.length) : href; | ||||
const qPos = h.indexOf('?'); | const qPos = h.indexOf('?'); | ||||
if (qPos !== -1) { | if (qPos !== -1) { | ||||
h = h.substring(0, qPos); | h = h.substring(0, qPos); | ||||
} | } | ||||
if (h.endsWith('/')) h = h.substring(0, h.length - 1); | if (h.endsWith('/')) h = h.substring(0, h.length - 1); | ||||
if ({{JS_PREFIX}}_non_authors.indexOf(h) !== -1) return false; | |||||
if (non_authors.indexOf(h) !== -1) return false; | |||||
const matches = h.match(/\//g); | const matches = h.match(/\//g); | ||||
if (matches !== null) { | if (matches !== null) { | ||||
// log('>>>>>> not a top-level link: h='+h+', href='+href); | // log('>>>>>> not a top-level link: h='+h+', href='+href); | ||||
@@ -54,11 +54,11 @@ | |||||
<!-- <logger name="org.cobbzilla.util.io.multi.MultiStream" level="TRACE" />--> | <!-- <logger name="org.cobbzilla.util.io.multi.MultiStream" level="TRACE" />--> | ||||
<!-- <logger name="bubble.filters.BubbleRateLimitFilter" level="TRACE" />--> | <!-- <logger name="bubble.filters.BubbleRateLimitFilter" level="TRACE" />--> | ||||
<!-- <logger name="org.cobbzilla.wizard.filters.RateLimitFilter" level="TRACE" />--> | <!-- <logger name="org.cobbzilla.wizard.filters.RateLimitFilter" level="TRACE" />--> | ||||
<logger name="bubble.service.stream.StandardRuleEngineService" level="DEBUG" /> | |||||
<!-- <logger name="bubble.service.stream.StandardRuleEngineService" level="DEBUG" />--> | |||||
<logger name="bubble.service.stream.ActiveStreamState" level="WARN" /> | <logger name="bubble.service.stream.ActiveStreamState" level="WARN" /> | ||||
<logger name="bubble.resources.stream" level="WARN" /> | <logger name="bubble.resources.stream" level="WARN" /> | ||||
<logger name="bubble.resources.stream.FilterHttpResource" level="DEBUG" /> | |||||
<!-- <logger name="bubble.resources.stream.FilterHttpResource" level="WARN" />--> | |||||
<!-- <logger name="bubble.resources.stream.FilterHttpResource" level="DEBUG" />--> | |||||
<logger name="bubble.resources.stream.FilterHttpResource" level="WARN" /> | |||||
<logger name="bubble.service.stream" level="INFO" /> | <logger name="bubble.service.stream" level="INFO" /> | ||||
<!-- <logger name="bubble.service.dbfilter" level="DEBUG" />--> | <!-- <logger name="bubble.service.dbfilter" level="DEBUG" />--> | ||||
<!-- <logger name="bubble.service.account.StandardAccountMessageService" level="DEBUG" />--> | <!-- <logger name="bubble.service.account.StandardAccountMessageService" level="DEBUG" />--> | ||||
@@ -17,7 +17,7 @@ | |||||
"requestCheck": true, | "requestCheck": true, | ||||
"requestModifier": true, | "requestModifier": true, | ||||
"fqdn": "m.facebook.com", | "fqdn": "m.facebook.com", | ||||
"urlRegex": "/home.php", | |||||
"urlRegex": "/(home\\.php)?", | |||||
"rule": "fb_user_blocker" | "rule": "fb_user_blocker" | ||||
}] | }] | ||||
} | } | ||||