Skip to content

Instantly share code, notes, and snippets.

@viki53
Last active May 2, 2025 21:42
Show Gist options
  • Save viki53/5d0f45e5f7ff2f77a772cb1f5694f2dc to your computer and use it in GitHub Desktop.
Save viki53/5d0f45e5f7ff2f77a772cb1f5694f2dc to your computer and use it in GitHub Desktop.
LinkedIn distraction-free

LinkedIn distraction free

What does this do?

It hides some distracting elements on LinkedIn's pages (especially the main feed), such as:

  • Upsell links
  • The news block
  • The games block
  • The "For companies" menu in the navbar

How to install

There is two main ways, depending on which browser/extension you use.

Stylus, for Firefox, Chrome, Opera (or any Chrome-based browser)

You need to install and activate an extension that accepts UserStyle files, such as Stylus.

Then open the raw firefox-stylus.user.css file in a new tab. The extension should install the styles automatically, or prompt you to do so. You can also manually create a new style in the extension and paste the contents of that raw file.

Browse LinkedIn with less distractions ✨

Userscripts, for Safari (iOS and macOS)

You need to have the Userscripts extension installed and activated.

Note: you will need to allow its use on the linkedin.com domain.

You can then open the extension page, and add a New CSS file in the sidebar and paste the contents of the raw safari.userscripts.css file into the editor, or add a New Remote and enter the URL of the raw file.

Updates

You should ask the extension to update the script whenever a new version is available. Both extensions have an auto-update feature that will fetch and install the new versions when available (based on the updateURL parameter in the comment block at the top of the file).

/* ==UserStyle==
@name linkedin-no-distraction
@namespace linkedin.com
@description Remove most distractions on LinkedIn
@version 1.4.0
@author Corentin Hatte (https://www.github.com/viki53)
@homepageURL https://gist.github.com/viki53/5d0f45e5f7ff2f77a772cb1f5694f2dc
@updateURL https://gist.github.com/viki53/5d0f45e5f7ff2f77a772cb1f5694f2dc/raw/firefox-stylus.user.css
@preprocessor default
==/UserStyle== */
@-moz-document domain("linkedin.com") {
.global-nav__primary-items .global-nav__primary-item--divider,
.global-nav__primary-items .global-nav__primary-item--divider + * { /* Hide Enterprise menu in navbar */
display: none !important;
}
.feed-outlet .feed-shared-update-v2 > * {
transition: all 180ms linear;
}
.feed-outlet .feed-shared-update-v2:not(:hover, :focus-within) > * { /* Blur timeline items by default */
filter: blur(6px) grayscale(1);
opacity: .2;
}
.global-footer-compact__item button { /* Fix dropdown labels having icon wrapped under */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Hide upsell links */
.premium-upsell-link,
.org-organization-admin-pages-entrypoint-card__premium-upsell-footer-top-text, /* Intro text for org admin upsell to premium page */
.org-organization-admin-pages-entrypoint-card__combined-upsell-anchor, /* Upsell org admin to premium page */
.org-organization-admin-pages-entrypoint-card__premium-upsell-grow-my-footer-link, /* Upsell for org admin to buy ads */
.artdeco-card.pv-profile-card:has(.pvs-premium-upsell__container), /* Upsell within related profiles list in sidebar */
.artdeco-card.pv-profile-card:has(#pymk_recommendation_from_school), /* Recommendations of people from same school */
.scaffold-layout__sticky:has(.community-panel), /* Community card in left sidebar */
.feed-identity-module__anchored-widget--premium-upsell,
#feed-right-rail-tooltip-outlet + .mb2, /* Lonely border at the top of right sidebar */
.news-module,
.news-module--with-game,
.learning-top-courses,
.pv-course-recommendations {
display: none;
}
}
/* ==UserStyle==
@name linkedin-no-distraction
@namespace linkedin.com
@description Remove most distractions on LinkedIn
@match https://*.linkedin.com/*
@version 1.4.0
@author Corentin Hatte (https://www.github.com/viki53)
@homepageURL https://gist.github.com/viki53/5d0f45e5f7ff2f77a772cb1f5694f2dc
@updateURL https://gist.github.com/viki53/5d0f45e5f7ff2f77a772cb1f5694f2dc/raw/safari.userscripts.css
==/UserStyle== */
.global-nav__primary-items .global-nav__primary-item--divider,
.global-nav__primary-items .global-nav__primary-item--divider + * { /* Hide Enterprise menu in navbar */
display: none !important;
}
.feed-outlet .feed-shared-update-v2 > * {
transition: all 180ms linear;
}
.feed-outlet .feed-shared-update-v2:not(:hover, :focus-within) > * { /* Blur timeline items by default */
filter: blur(6px) grayscale(1);
opacity: .2;
}
.global-footer-compact__item button { /* Fix dropdown labels having icon wrapped under */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Hide upsell links */
.premium-upsell-link,
.org-organization-admin-pages-entrypoint-card__premium-upsell-footer-top-text, /* Intro text for org admin upsell to premium page */
.org-organization-admin-pages-entrypoint-card__combined-upsell-anchor, /* Upsell org admin to premium page */
.org-organization-admin-pages-entrypoint-card__premium-upsell-grow-my-footer-link, /* Upsell for org admin to buy ads */
.artdeco-card.pv-profile-card:has(.pvs-premium-upsell__container), /* Upsell within related profiles list in sidebar */
.artdeco-card.pv-profile-card:has(#pymk_recommendation_from_school), /* Recommendations of people from same school */
.scaffold-layout__sticky:has(.community-panel), /* Community card in left sidebar */
.feed-identity-module__anchored-widget--premium-upsell,
#feed-right-rail-tooltip-outlet + .mb2, /* Lonely border at the top of right sidebar */
.news-module,
.news-module--with-game,
.learning-top-courses,
.pv-course-recommendations {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment