Skip to content

Instantly share code, notes, and snippets.

@reggi
Created October 29, 2023 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reggi/0e62bb1755199a754e7257651521417f to your computer and use it in GitHub Desktop.
Save reggi/0e62bb1755199a754e7257651521417f to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hide LinkedIn Posts
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Hide posts with MongoDB as the employer on LinkedIn
// @author You
// @match *://www.linkedin.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
const posts = document.querySelectorAll('.artdeco-entity-lockup__content');
posts.forEach(post => {
const employerElement = post.querySelector('.artdeco-entity-lockup__subtitle');
if (employerElement && employerElement.textContent.includes('MongoDB')) {
post.style.display = 'none';
}
});
});
});
observer.observe(document.body, { childList: true, subtree: true });
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment