Last active
February 16, 2022 19:49
-
-
Save rigwild/219c20d910da72901e20bc10a6f0411a to your computer and use it in GitHub Desktop.
Tampermonkey script to remove spam companies from LinkedIn job search page
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
// ==UserScript== | |
// @name Remove spam companies | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Remove spam job postings from LinkedIn job search | |
// @author rigwild (https://github.com/rigwild) | |
// @match https://www.linkedin.com/jobs/search* | |
// @grant none | |
// ==/UserScript== | |
// https://gist.github.com/rigwild/219c20d910da72901e20bc10a6f0411a | |
const blacklist = new Set([ | |
'Technicus.nl', | |
'Werkzoeken.nl', | |
'ICTerGezocht.nl', | |
]) | |
const removeSpam = () => { | |
const listings = Array.from(document.querySelectorAll('li.jobs-search-results__list-item')) | |
let count = 0 | |
let spammers = new Set() | |
listings.forEach(x => { | |
const content = x.querySelector('a[data-control-name="job_card_company_link"]') | |
if (content && blacklist.has(content.textContent.trim())) { | |
x.remove() | |
spammers.add(content.textContent.trim()) | |
count++ | |
} | |
}) | |
if (count > 0) console.log(`[Remove spam companies] Removed ${count} spam job postings`, spammers) | |
} | |
(async () => { | |
'use strict'; | |
while (true) { | |
await new Promise(res => setTimeout(res, 800)) | |
removeSpam() | |
} | |
})() |
Thank you. These neuken companies flooding the job ads with bullshit and there's nothing you can do about it since you can't report accounts.
Oh, after searching for it on the internet I felt like I was the only one complaining ahah
this script is not perfect though
It does its job well 👍 I just had to adapt it so it can remove the spam from recommendations too
Not sure how to make a pull request on a gist, but if you want to remove the spam from recommendations, I put that code in my fork of your script: https://gist.github.com/virgiliu/5f6fc86bb79a3c6d782441167e3ae470
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you. These neuken companies flooding the job ads with bullshit and there's nothing you can do about it since you can't report accounts.