Hide distractions with a focus policy
Declare what the browser extension hides on the live site while a feed is followed.
Focus is the part of a package that acts on the live site instead of on a capture. While someone follows one of your feeds, the browser extension applies the policy on the URLs it names: hiding elements, or replacing a feed with a Fruitful panel. It never runs package code.
Declare a policy
"focus": [
{
"id": "newsfeed-focus",
"feeds": ["newsfeed"],
"urls": [
{ "pattern": { "hostname": "linkedin.com", "pathname": "/feed" } },
{ "pattern": { "hostname": "*.linkedin.com", "pathname": "/feed/*" } }
],
"hide": [
"linkedin.com##aside.scaffold-layout__aside",
"linkedin.com##.feed-right-rail",
"linkedin.com##section:has(h2:has-text(/^LinkedIn News$/i))"
]
}
]feedslists route ids. The policy is active only while the feed on one of those routes is followed by an installed package.urlsare browsing URLs, distinct from capture routes. Cover the hostname variants people actually visit.hideis a list of cosmetic rules in adblock syntax, applied by the extension's cosmetic engine.domain##selectoris the common form;:has()and:has-text()are available.
Scope it
Hide what competes for attention, not what the person came for: sidebars, recommendation rails, trending modules, notification badges. Leave navigation, search, and the person's own content alone. A policy that hides too much gets disabled by the user and stops protecting them.
Write one policy per route whose feed people follow. Policies are independent; a person who follows two feeds on one site gets both.
Test it
Load the package into the extension locally and visit the URLs; see Test focus in the extension. Cosmetic rules are cheap to change and do not affect the capture pipeline, so iterate freely.
Reference: focusPolicy.