-
-
Save jaydorsey/d728423051fbcb54f1abd53ed3920c9e to your computer and use it in GitHub Desktop.
# Block things on LinkedIn with uBlock Origin that LinkedIn won't let you block | |
# Choose "Options" in uBlock Origin with a right-click, and add these to | |
# "My filters" | |
# ADDING YOUR OWN FILTERS | |
# | |
# Using Linkedin.com as an example | |
# | |
# 1. Open up the webpage | |
# 2. Find some text you want to block | |
# 3. Open up a console (right-click, Inspect, click the Console tab) | |
# 4. Using the "greedy" placeholder example, find your text | |
# | |
# $x("//*[(text()[contains(.,'YOUR TEXT HERE')])]") | |
# | |
# Click the arrow to expand the result in the console and hover over | |
# one of the numbered elements shown; it should highlight an element in | |
# the webpage | |
# | |
# The code above usually just finds the HEADER where the text is present. You typically | |
# want to block one of the parent elements. Which parent element? | |
# | |
# You can use the xpath parent navigator syntax to move "up" thru the parents. Just | |
# take what you wrote above, and keep adding a bunch of /.. values to the end. In between | |
# each, expand the result in your console and hover over the elements to see if you've | |
# moved up the tree enough to block the entire element you want | |
# 2023-10-07 So many recommendations from LinkedIn | |
linkedin.com##:xpath('//*[(text()[contains(., "Suggested")])]/../../../../../../../../../..') | |
linkedin.com##:xpath('//*[(text()[contains(., "Expert answers on ")])]/../../../../../../../../../..') | |
linkedin.com##:xpath('//*[(text()[contains(., "Recommended for you")])]/../../../../../../../../../..') | |
linkedin.com##:xpath('//*[(text()[contains(.,"Events recommended for you")])]/../../../../../../../../../..') | |
# 2020-02-24 Promoted posts | |
linkedin.com##xpath('.//span[contains(@class, "feed-shared-actor__sub-description") and text()[contains(.,"Promoted")]]/../../../..') | |
# 2023-01-23 Promoted posts (thanks @Vaansh! & @kagzgenius) | |
linkedin.com##li:has-text(Promoted) | |
# Sponsored posts (old version) | |
linkedin.com##:xpath('//*[(text()[contains(.,"Promoted")])]/../../../..') | |
# Events recommended for you 2023-03-03 | |
linkedin.com##:xpath(//span[text()[contains(.,'Events recommended for you')]]/../../../../../..) | |
# Recommended for you 2023-03-03 Generic recommendation block w/ companies or pages | |
linkedin.com##:xpath(//span[text()[contains(.,'Recommended for you')]]/../../../../../..) | |
# 2021-09-24 Add to your feed | |
linkedin.com##:xpath('//*[(text()[contains(.,"Add to your feed")])]/../../../../../../..') | |
# Courses & News 2021-09-24 | |
linkedin.com##:xpath('//*[(text()[contains(.,"Today’s top courses")])]/../../../..') | |
# Completely unrelated jobs that are always the exact opposite of your profile | |
linkedin.com##:xpath('//*[(text()[contains(.,"Jobs recommended for you")])]/../../../../../../..') | |
# 2022-12-06 | |
linkedin.com##:xpath(//span[(text()[contains(.,'Recommended for you')])]/../../../../../../../../../..) | |
linkedin.com##:xpath(//span[(text()[contains(.,'Events recommended for you')])]/../../../../../../../../../..) | |
# LinkedIn News 2023-03-03 | |
linkedin.com##:xpath(//span[text()[contains(.,'LinkedIn News')]]/../../..) | |
# I think this one stopped working, but leaving here for reference | |
linkedin.com##:xpath('//*[(text()[contains(.,"LinkedIn News")])]/../../../../../..') | |
# Network likes 2023-03-03 | |
linkedin.com##:xpath(//span[text()[contains(.,'likes this')]]/../../../../..) | |
# Starting a new position banner image 2023-03-03 | |
linkedin.com##:xpath(//div[contains(@class, 'feed-shared-celebration-image')]) | |
# Facebook junk (no longer updated, I don't use facebook) | |
# Sponsored post garbage | |
facebook.com##:xpath('//*[(text()[contains(.,"Sponsored")])]/../../../..') | |
# Marketplace garbage | |
facebook.com##:xpath('//*[(text()[contains(.,"Still Available on Marketplace")])]/../../../../../..') |
Hi I'm unable to see any jobs when I enable the filter to remove promoted filter. It does render again but I find jobs on very limited of those pages. Does it work on chrome
Hi I'm unable to see any jobs when I enable the filter to remove promoted filter. It does render again but I find jobs on very limited of those pages.
Blocking 'Promoted' listings on Linkedin is like that old joke:
Person: Hey Doc! Everytime I twisted arm like this, I get a terrible pain.
Doctor: Then don't do that.
The pain is Linkedin: they're pushing more&more listings to be paid ie 'Promoted'. It seems most listings already are. Who knows if/when they'll block free listings.
So don't block 'Promoted' ; instead filter on job Title, Company name or Location like I described here.
Thanks a lot for this suggestion. Appreciate it. Had to block this staffing agencies which had 100's of jobs on Linkedin. It does help me with that and make my search effective !
@jaydorsey,
Thank you and all the other participants for such a helpful blocking list.
Just in case, I'm using the following subset that works at the moment I'm writing this post:
Copy and paste it to the uBlock's
![image](https://private-user-images.githubusercontent.com/35307286/313013282-fd72a19e-54c0-4483-8cf1-2bc38ed51818.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxOTM1MTIsIm5iZiI6MTcyMDE5MzIxMiwicGF0aCI6Ii8zNTMwNzI4Ni8zMTMwMTMyODItZmQ3MmExOWUtNTRjMC00NDgzLThjZjEtMmJjMzhlZDUxODE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA1VDE1MjY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYxNWZkZTg4ODkzNmQ5YTc1MmZmYWY2M2YwMDdjZTFjOWQ5NjE2Yzk1YTlhODczYmQ2YWRhNDkzZTZhN2ZjNTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.lU_4OEFIpqar7WqgLJG9-7wv4XFNBYIAavFLhVvUXPw)
My Filters
tab and clickApply changes