Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/background/store/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export const registerContentScripts: BackgroundEffect =
css: ['eradicate.css'],
matches: siteMatches,
runAt: 'document_start',
allFrames: true,
},
]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/sites/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const Sites: Record<SiteId, Site> = {
linkedin: {
label: 'LinkedIn',
domain: ['linkedin.com'],
paths: ['/', '/feed/'],
paths: ['/', '/feed/', '/preload/'],
Copy link
Contributor Author

@oliverpavletic oliverpavletic Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iframe in question uses this URL
#document (https://www.linkedin.com/preload/).

origins: ['http://www.linkedin.com/*', 'https://www.linkedin.com/*'],
css: linkedinCss,
},
Expand Down
1 change: 1 addition & 0 deletions src/sites/linkedin.str.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* LinkedIn */
html:not([data-nfe-enabled='false'])
main[aria-label='Main Feed']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to make the CSS selector more specific, as including all iframes caused the notifications tab to be eradicated.

.scaffold-finite-scroll
> div:not(#nfe-container) {
opacity: 0 !important;
Expand Down
4 changes: 3 additions & 1 deletion src/sites/linkedin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export function eradicate(store: Store) {
}

// Don't do anything if the UI hasn't loaded yet
const feed = document.querySelector('.scaffold-finite-scroll');
const feed = document.querySelector(
"main[aria-label='Main Feed'] .scaffold-finite-scroll"
);
if (feed == null) {
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/webextension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type RegisteredContentScript = {
css?: string[];
matches: string[];
runAt: 'document_start' | 'document_end' | 'document_idle';
allFrames: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

};

type WebExtensionEvent<Arg> = {
Expand Down