LinkedIn tweaks — a calmer feed with CSS and JS
LinkedIn can be useful, but its feed is densely packed with promoted posts, "People you may know" modules, a news rail and reaction counts that all pull your attention sideways. This guide shows how to declutter linkedin.com with a few CSS and JS rules in JustZix — hide what you never read and keep just the stream of content from the people you follow.
Why trim LinkedIn at all
The LinkedIn feed mixes several kinds of content: posts from people you follow, "promoted" posts (ads), like suggestions, follow suggestions and a news carousel in the right column. To the algorithm that is all "engagement"; to you it is noise. JustZix runs locally inside the tab: a CSS rule hides an element, a JS rule can remove it from the DOM or mute its colors. Nothing leaves your browser, and every change is pinned to linkedin.com and toggled with one click.
Hide promoted and sponsored posts
Ads in the LinkedIn feed are labelled "Promoted" (or "Sponsored" in some locales). The post container itself has no stable class, but the element carrying that text can be matched. The simplest pure-CSS attempt leans on helper attributes:
/* Mute containers flagged as advertising */
.feed-shared-update-v2:has(.update-components-actor__description) {
/* helper selector only — see the JS rule below */
}
/* Dim the visible "Promoted" label once you know it is an ad */
span.update-components-actor__description {
opacity: 0.55 !important;
}
CSS cannot match an element by its text, so the reliable route is a short JS rule that scans the feed and hides the whole post containing the ad label:
// Hide "Promoted" / "Sponsored" posts in the feed
function hideSponsored() {
const labels = document.querySelectorAll(
'.update-components-actor__description, .update-components-text'
);
labels.forEach(el => {
const t = (el.textContent || '').trim().toLowerCase();
if (t === 'promoted' || t === 'sponsored') {
const post = el.closest('.feed-shared-update-v2, div[data-id]');
if (post) post.style.display = 'none';
}
});
}
hideSponsored();
// The feed lazy-loads while scrolling — watch for changes
new MutationObserver(hideSponsored).observe(
document.body, { childList: true, subtree: true }
);
Cut the "People you may know" and "Add to your feed" modules
Between regular posts LinkedIn injects cards with follow and like suggestions. Those are not content — they are click prompts. You can hide them with a CSS rule targeting the suggestion components:
/* "People you may know" and "Add to your feed" cards */
.discover-entity-type-card,
.feed-follows-module,
section.artdeco-card:has(.discover-cohort-card),
.update-components-header:has(span[aria-label*="suggested"]) {
display: none !important;
}
/* Inline follow prompt baked into a post */
.feed-shared-actor__follow-button {
display: none !important;
}
Hide the right-hand news rail
The right column ("LinkedIn News", "Add to your feed", trends) takes a fixed width and adds nothing to reading. Hiding it widens the main stream:
/* Hide the right rail and widen the feed */
aside.scaffold-layout__aside,
.news-module,
.feed-news-module {
display: none !important;
}
/* Let the main column take the freed space */
.scaffold-layout__row {
grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) !important;
}
Focus mode — posts only
When you want to scan the feed with no distractions, a single rule can hide the left profile column, the right rail and the reaction count under every post:
/* Focus mode: the post stream only */
aside.scaffold-layout__aside,
.scaffold-layout__sidebar,
.social-details-social-counts {
display: none !important;
}
/* Hide the reaction and comment counters */
.social-details-social-counts__count-value,
.social-details-social-counts__reactions-count {
display: none !important;
}
Mute distractions to grayscale
If you would rather not remove elements but only tone them down, a JS rule can desaturate notifications and the sponsored banner while leaving color where you read:
// Tone distractions down instead of removing them
const muted = document.querySelectorAll(
'.feed-news-module, .discover-entity-type-card, .ad-banner-container'
);
muted.forEach(el => {
el.style.filter = 'grayscale(1)';
el.style.opacity = '0.6';
});
Build your own set
Keep these tweaks as separate, named rules — "LinkedIn: no ads", "LinkedIn: no suggestions", "LinkedIn: focus mode" — each pinned to linkedin.com. Then a single click fits the feed to how you want to use it right now.
Ready-made rules for LinkedIn are in the catalog — see the examples for linkedin.com and copy whatever fits. Install JustZix and calm your feed today.
Rate this post
No ratings yet — be the first.