Created
October 29, 2023 00:00
-
-
Save reggi/0e62bb1755199a754e7257651521417f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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