Last active
April 7, 2022 12:00
-
-
Save guilhermepontes/c5311896ae4ef352cfb7ca021f15fb99 to your computer and use it in GitHub Desktop.
Remove promoted jobs LinkedIn
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
(() => { | |
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