paulshryock / Clean-Up-the-Web

Clean Up the Web removes certain HTML elements from websites which provide an unpleasant user experience.
Other
0 stars 0 forks source link

How does Clean Up the Web work, and how does it compare with other Add-Ons? #1

Closed EstherMoellman closed 3 years ago

EstherMoellman commented 3 years ago

Hi @paulshryock ,

Firstly, thank you for your Clean-Up-the-Web (CUTW).

I would like to understand better your add-on, so please allow me the following simple questions:

Thanks in advance!

paulshryock commented 3 years ago

Hi @EstherMoellman, thanks for checking out this extension. 👋

Currently, CUTW does not block any requests. It's behavior is purely cosmetic, as it removes HTML content which matches any of the CSS selectors below. These would typically be ads, cookie policy banners, and certain visual elements which in my opinion lend toward an unpleasant user experience. Like walking down the street and seeing trash on the sidewalk.

"[id^="ad-"]"
​"[id^="ad_"]"
​"[id^="Ad-"]"
​"[id^="Ad_"]"
​"[id^="AD-"]"
​"[id^="AD_"]"
​"[id$="-ad"]"
​"[id$="_ad"]"
​"[id$="-Ad"]"
​"[id$="_Ad"]"
​"[id$="-AD"]"
​"[id$="_AD"]"
​"[id*="adfuel"]"
​"[id*="adblock"]"
​"[id*="DisplayAd"]"
​"[id*="onetrust"]"
​"[id*="sap-insights"]"
​"[id*="cookie"]"
​"[id="taw"]"
​"[class^="ad-"]"
​"[class^="ad_"]"
​"[class^="Ad-"]"
​"[class^="Ad_"]"
​"[class^="AD-"]"
​"[class^="AD_"]"
​"[class$="-ad"]"
​"[class$="_ad"]"
​"[class$="-Ad"]"
​"[class$="_Ad"]"
​"[class$="-AD"]"
​"[class$="_AD"]"
​"[class*="adfuel"]"
​"[class*="adblock"]"
​"[class*="DisplayAd"]"
​"[class*="onetrust"]"
​"[class*="sap-insights"]"
​"[class*="cookie"]"
​"[class="taw"]"

If any future version of this extension ever does block any requests, then I will be sure to include detailed Changelog release notes about that. But as of now, I do not plan on blocking any requests with this extension.

In the future, I would like to add more small enhancements to the extension--things that improve the accessibility, performance, or user experience of websites. For example, on websites with text that is too small to read, I'd like to automatically bump up the font size. Or websites with not enough color contrast between text and background, I'd like to bump up the visual contrast to make text automatically more readable. The idea would be to automatically "clean things up" (nicely and unobtrusively) when a website is not very easy to read, is not accessible, or has too much clutter.

Since this is a hobby project, I cannot guarantee these improvements will be done any time soon (or ever), but I do hope to make time to work on it.

For your last question about what makes this better than other Add-Ons--to be honest, I don't know if it is better. I have not used other ad blocking plugins extensively to really know all of their features, and I have not audited their code to really know what's going on under the hood. I can say that my plan for this extension is to keep it "lightweight" and simple.

I'd be honored if you'd like to give it a try, but no hard feelings if you go with something else more robust.

I'm happy to answer any other questions you may have.

Cheers, Paul

EstherMoellman commented 3 years ago

Thanks @paulshryock for your replay!

I personally prefer and use web-request blockers. But I do recognize that some CSS' cosmetic filters are very useful. In fact, I use several of them directly in my userChrome.css file.

Time ago I found an add-on similar to your CUTW. It was removed from AMO. I never used that add-on, but I copied/pasted part of its CSS' cosmetic filters, and I used them inside my userChrome. If you're interested, here at GitHub you can find this add-on: https://github.com/eladkarako/chrome_extensions/releases/download/LatestFirefox/pleasant_web-1.0.0.8-an+fx.xpi Hope this may help to improve your add-on!

Thanks again!

paulshryock commented 3 years ago

If I were to block any web requests with this Add-On, what type of requests would you want it to block? Any details you have about what/why would be useful in considering if I should add that functionality here.

Do you have a link to the source code for that Pleasant Web Add-On, so I can check out what's happening under-the-hood?

EstherMoellman commented 3 years ago

Hi @paulshryock !

With regards to PleasantWeb add-on, as I explained yesterday, originally it was uploaded to AMO, but time ago its own Dev decided to remove it. You can find PleasantWeb in the link I already posted (my previous comment). That link is the PleasantWeb Dev repo here in GitHub. You will see there PleasantWeb in the format of xpi file. That xpi file was already signed by Mozilla, so it's ready to go, you can install and test. Or you can download and explore the entire xpi file (it's an open-source). PleasantWeb add-on may help you to improve your JS code, and also may help you to improve the list of CSS' elements to hide.

With regards to your first question (thanks for asking me!), here is my answer: 1) By just blocking 3rd-party JS script requests, easily 80% of the web-garbage can be blocked. This can be done with a lightweight add-on like: https://addons.mozilla.org/en-US/firefox/addon/javascript-firewall/ 2) By blocking web-requests with few RegExps, tons of web-garbage can be avoided. This tiny add-on does the job: https://addons.mozilla.org/en-US/firefox/addon/rule-adblocker/

Both add-ons are extremely efficient... IMO both are unbeatable. However, JavascriptFirewall add-on may break webpages (not good for average users). And RuleAdblocker add-on is too basic, needs more features. Therefore, IMO the perfect blocker add-on should be a hybrid between JavascriptFirewall and.RuleAdblocker: 1) Tiny/lightweight, low CPU' use. 2) Blocking web-requests by using a mix of few RegExps + 3rd-party JS scripts. 3) Cosmetic filter function like your CUTW add-on (in order to hide CSS' web-garbage) + include a feature in order to allow users to add their own CSS' element (to block). 4) Whitelist feature. 5) Not sure if it's feasible, but an AI blocker add-on... will be absolutely amazing!

I'm against: a) Blocking-lists (they kill browser performance and are inefficient). b) Blocking other 1st or 3rd-party stuff (XHR, Frames etc). That breaks lot of webpages, kills the browsing experience, increases entropy, and hurts browser performance. c) Add-ons like uBlock (years ago they were extremely useful, but nowadays they're relics, walking-dead dinosaurs, ... browser performance killers).

Well @paulshryock , if by chance you decide to build something similar to my dreamed blocker add-on... then count on me! I'll be more than happy to help you. I'm convinced that the new generation of modern blocker add-ons should be built based on a mix of RegExps & 3rd-party js scripts & CSS' cosmetic filter. If you have the programming skills, the knowledge, and the willing... then this challenge may be an opportunity for you : )

Have a nice weekend!

paulshryock commented 3 years ago

I like those ideas, and you've given me a lot to think about. Thank you! That was very helpful.