Skip to content

Instantly share code, notes, and snippets.

@loucyx
Last active August 18, 2026 16:58
Show Gist options
  • Select an option

  • Save loucyx/e76dd97a2421d67d6814aaf06555fc74 to your computer and use it in GitHub Desktop.

Select an option

Save loucyx/e76dd97a2421d67d6814aaf06555fc74 to your computer and use it in GitHub Desktop.
Bookmarklet to expose LinkedIn sloperators
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();
})();
@loucyx

loucyx commented Aug 3, 2026

Copy link
Copy Markdown
Author

Feel free to suggest improvements to the selectors and filters.

@loucyx

loucyx commented Aug 3, 2026

Copy link
Copy Markdown
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!

@loucyx

loucyx commented Aug 18, 2026

Copy link
Copy Markdown
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