General > General Technical Chat
Custom uBlock filters for HackADay.com
PapierzToaletowy:
Quite the difference :-+
Default
--- End quote ---
Standard uBlock Origin filters
--- End quote ---
My filters
--- End quote ---
Here's the code
--- Code: ---hackaday.com##^img.trackImg#hdTrack
hackaday.com##^div.featured-slides
hackaday.com##^div.sidebar-widget-wrapper
hackaday.com##^aside:has(div.featured-projects)
hackaday.com##^aside:has(div.shopify-items)
hackaday.com##^aside:has(div.trending-projects)
hackaday.com##^footer.site-footer
hackaday.com##^li.menu-item > a:has-text("Hackaday.io")
hackaday.com##^li.menu-item > a:has-text("Tindie")
hackaday.com##^li.menu-item > a:has-text("Hackaday Prize")
hackaday.com##^li.menu-item > a:has-text("Submit")
hackaday.com##^nav.navigation.post-navigation
hackaday.com##^div.content-ads-holder
hackaday.com##div.textwidget:has-text("/The.*is Sponsored by/"):upward(1)
hackaday.com##div.comments-area:style(margin: 0px 0 0 !important)
hackaday.com##h1.widget-title:has(a:has-text("From The Blog"))
hackaday.com##a.see-all-link:has-text("See all blog entries")
! clickbait content on the main page
hackaday.com##^ul.recent_entries-list > li:has(a[title="Posts by Maya Posch"])
hackaday.com##^ul.recent_entries-list > li:has(a[title="Posts by Kristina Panos"])
hackaday.com##^ul.recent_entries-list > li:has(a[title="Posts by Jenny List"])
! clickbait content in "more posts"
hackaday.com##^article > :has(h1.entry-title > a) > :has(a[title="Posts by Maya Posch"]):upward(2)
hackaday.com##^article > :has(h1.entry-title > a) > :has(a[title="Posts by Kristina Panos"]):upward(2)
hackaday.com##^article > :has(h1.entry-title > a) > :has(a[title="Posts by Jenny List"]):upward(2)
! Not interesting
hackaday.com##^li > div > h2 > a:has-text("/^Hackaday Podcast/"):upward(3)
hackaday.com##^article > header > h1 > a:has-text("/^Hackaday Podcast/"):upward(3)
! Shitposters in comments
hackaday.com##^article.comment-body:has(div.comment-author:has-text("INSERT USER NAME")):upward(1)
! unwanted topics
hackaday.com##^ul.recent_entries-list > li:has(h2 > a:has-text("cyberdeck"))
--- End code ---
RoGeorge:
For those less skilled with code, in uBlock origin, it is possible to point at the elements you want gone.
For Hackaday I use no custom filters, only the default uBlock Origin, just that I do not go to the main page.
This is how I visit Hackaday:
https://hackaday.com/blog/
https://hackaday.io/projects?sort=date
PapierzToaletowy:
--- Quote from: RoGeorge on September 25, 2023, 09:03:10 am ---For those less skilled with code, in uBlock origin, it is possible to point at the elements you want gone.
--- End quote ---
Yeah, I used Firefox developer tools (F12) to find HTML elements, which I want removed and then wrote filters with static filters and cosmetic filters docs.
It's possible to use uBlock "eye dropper" / element picker tool, but I found it's not as reliable as doing it by hand.
PapierzToaletowy:
Another hack I came up with today. Prevents YouTube shorts from doomscrolling me into unrelated content.
I got pissed off when watching some quick tool overview and accidentally went into "prank" videos.
Only the first video will be available.
Code: https://pastebin.com/raw/87yGWpKC
(sorry for pastebin, forum software keeps expanding links inside "code" tag and mangles the uBlock filter code :palm:)
Faranight:
Post the filters on Reddit r/uBlockOrigin and they might get added to the global filter list.
Navigation
[0] Message Index
[#] Next page
Go to full version