Skip to content

Instantly share code, notes, and snippets.

@guilhermepontes
Last active April 7, 2022 12:00
Show Gist options
  • Save guilhermepontes/c5311896ae4ef352cfb7ca021f15fb99 to your computer and use it in GitHub Desktop.
Save guilhermepontes/c5311896ae4ef352cfb7ca021f15fb99 to your computer and use it in GitHub Desktop.
Remove promoted jobs LinkedIn
(() => {
let i = 0;
let d = document;
let t = 1000;
let results = '.jobs-search-results__list';
let item = '.jobs-search-results__list-item';
let footer = '.job-card-container__footer-item';
let get = (s) => d.querySelector(s);
let getAll = (s) => d.querySelectorAll(s);
get(results).scrollIntoView(false);
setInterval(() => {
getAll(item).forEach(item => {
if(item.querySelector(footer)?.textContent?.includes('Promoted')) {
i++;
item.parentElement.removeChild(item);
}
});
console.log(`Removed ${i} promoted jobs`);
}, t)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment