Last active
August 18, 2026 16:58
-
-
Save loucyx/e76dd97a2421d67d6814aaf06555fc74 to your computer and use it in GitHub Desktop.
Bookmarklet to expose LinkedIn sloperators
This file contains hidden or 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
| javascript: (() => { | |
| const titleSelector = ` | |
| a[href^='https://www.linkedin.com/in/']+div>div:only-child>div:nth-child(2)>p>span, | |
| a[href^='https://www.linkedin.com/in/']>div>div>p>span:not(:has(span)) | |
| `; | |
| const isSloperator = (title) => title.match(/prompt engineer/i); | |
| const hasSlop = (title) => title.match(/(?:AI|LLM)/); | |
| const expose = () => | |
| document.querySelectorAll(titleSelector).forEach((span) => { | |
| return hasSlop(span.textContent) || isSloperator(span.textContent) ? | |
| ((span.textContent = `🤖 ${span.textContent.replaceAll(/prompt engineer/gi, "Sloperator").replaceAll(/(?:AI|LLM)/g, "SLOP")}`), | |
| (span.style.color = "red"), | |
| (span.title = span.textContent.trim())) | |
| : undefined; | |
| }); | |
| const removeSponsored = () => | |
| document | |
| .querySelectorAll("span") | |
| .forEach((span) => | |
| span.textContent.startsWith("Promoted") ? | |
| span.closest("[data-lazy-mount-id]").remove() | |
| : undefined, | |
| ); | |
| const cleanup = () => (expose(), removeSponsored()); | |
| new MutationObserver(cleanup).observe(document.body, { | |
| childList: true, | |
| subtree: true, | |
| }); | |
| cleanup(); | |
| })(); |
Author
Author
I'm thinking I might update this to replace "AI/LLM" with "Slop", appending the "🤖" at the start of the title, and changing "Prompt Engineer" with "Sloperator". It makes it more funny, and we can get rid of all the "AI hater" guards, because "Slop hater" also works Done!
Author
Sponsored content nowadays is mainly slop, so I added a removeSponsored function that deals with that.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feel free to suggest improvements to the selectors and filters.