{"id":385,"date":"2024-02-14T18:35:42","date_gmt":"2024-02-14T18:35:42","guid":{"rendered":"https:\/\/liverickson.com\/blog\/?p=385"},"modified":"2024-02-16T15:05:33","modified_gmt":"2024-02-16T15:05:33","slug":"til-writing-a-custom-adblocker-ultimate-filter-to-hide-linkedins-ai-feature-upsell","status":"publish","type":"post","link":"https:\/\/liverickson.com\/blog\/?p=385","title":{"rendered":"TIL: Writing a Custom AdBlocker Ultimate Filter to hide LinkedIn&#8217;s AI Feature Upsell"},"content":{"rendered":"\n<p>On the list of &#8220;things that annoy me about AI&#8221;, trying to upsell AI features as part of a service is close to the top. I&#8217;ve recently noticed that my LinkedIn feed has been shoving an AI icon and related &#8220;coaching prompts&#8221; into my feed, and my solution of hiding every post that had the icons on them wasn&#8217;t actually filtering the system the way that I wanted. Today I spent a few minutes learning how to write a custom filter for AdBlocker Ultimate, one of the ad blockers that I use, to figure out how to filter out this new AI feature. Because it&#8217;s ultimately <em>not even the AI itself <\/em>&#8211; clicking on any of the icons is just an upsell for LinkedIn premium to unlock the feature. <\/p>\n\n\n\n<p><strong>If you just want the filter: <\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">linkedin.com##[data-test-icon*=\"signal-ai-small\"]\nlinkedin.com##.artdeco-button[aria-label*=\"Get key takeaways from this post\"]\nlinkedin.com##.coach-shared-hscroll-bar__multi-container<\/pre>\n\n\n\n<p>I actually think that this should work with just the bottom two lines (the first hid the icons, but not the button itself) but I&#8217;m too lazy to go change my filter and refresh a page, so you can try it out with the two lines instead if you so choose. <\/p>\n\n\n\n<p><strong>How it works:<\/strong><\/p>\n\n\n\n<p>The way that ad blockers work is by matching elements on the page against a known set of things that we don&#8217;t want to see. The syntax above checks a particular website (linkedin.com) against a CSS rule filter, and if it&#8217;s a match, it changes it to become invisible.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"108\" src=\"https:\/\/liverickson.com\/blog\/wp-content\/uploads\/2024\/02\/image.png\" alt=\"\" class=\"wp-image-386\" srcset=\"https:\/\/liverickson.com\/blog\/wp-content\/uploads\/2024\/02\/image.png 804w, https:\/\/liverickson.com\/blog\/wp-content\/uploads\/2024\/02\/image-300x40.png 300w, https:\/\/liverickson.com\/blog\/wp-content\/uploads\/2024\/02\/image-768x103.png 768w, https:\/\/liverickson.com\/blog\/wp-content\/uploads\/2024\/02\/image-800x108.png 800w\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" \/><\/figure>\n\n\n\n<p>I wouldn&#8217;t generally start with filtering on an <code>aria-label<\/code> CSS property, but in inspecting the webpage code, I couldn&#8217;t successfully use any other property that would hide the AI content, but not other elements on the page. My first attempts at filtering out the content using the built-in selection tool hid the box at the top of the page that lets you post content to LinkedIn, which isn&#8217;t the biggest deal for me, honestly. But, I decided to go with a more proper approach because L E A R N I N G. <\/p>\n\n\n\n<p><strong>Applying the fix:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Copy the lines above (or just the bottom two) and open up the &#8216;Settings&#8217; in the AdBlocker Ultimate add-on menu.<\/li>\n\n\n\n<li>Click the &#8216;Custom Rules&#8217; tab<\/li>\n\n\n\n<li>Paste the lines in at the bottom of the rule list<\/li>\n\n\n\n<li>Enjoy (?) LinkedIn without the constant little reminders that you are the product until you succumb to Microsoft&#8217;s copilot obsession<\/li>\n<\/ol>\n\n\n\n<p><strong>Takeaway<\/strong>:<\/p>\n\n\n\n<p>We don&#8217;t need to accept AI everywhere! Defend yourself! I won&#8217;t go down without a fight!<\/p>\n\n\n\n<p><strong>Bonus: <\/strong><br>You can add the following two lines to also get rid of &#8220;collaborative articles&#8221;!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>linkedin.com##.update-components-header--with-divider<br>linkedin.com##.feed-shared-conversations__navigation-context<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>On the list of &#8220;things that annoy me about AI&#8221;, trying to upsell AI features as part of a service is close to the top. I&#8217;ve recently noticed that my LinkedIn feed has been shoving an AI icon and related &#8220;coaching prompts&#8221; into my feed, and my solution of hiding every post that had the icons on them wasn&#8217;t actually filtering the system the way that I wanted. Today I spent a few minutes learning<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":0,"activitypub_interaction_policy_quote":"","activitypub_status":"","footnotes":""},"categories":[3,5],"tags":[],"class_list":["post-385","post","type-post","status-publish","format-standard","hentry","category-development","category-machine-learning"],"_links":{"self":[{"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=385"}],"version-history":[{"count":2,"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":388,"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/385\/revisions\/388"}],"wp:attachment":[{"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liverickson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}