yobukodori / script-for-me

A tiny userscript manager. Injects JavaScript code (and CSS code) into a page. A simple wrapper for the browser.contentScripts API.
Mozilla Public License 2.0
0 stars 0 forks source link

Please Help With Java Script code for Firefox #3

Closed Decopi closed 1 year ago

Decopi commented 1 year ago

Hi @yobukodori !

It's been a while since our last contact. But I haven't stopped using your Script-For-Me add-on... in my opinion it's fantastic! I will always be grateful for your work, and I will never get tired of congratulating you.

Today I contact you again to ask for help with a javascipt code. It is a code for Firefox to block ads. I remind you that I have zero knowledge of javascript.

With the help of ChatGPT I made this ads blocker. I tested it in your Script-For-Me and it works. As header I use: //name MyAdBlocker //matches :///* //options { "runAt":"document_start" } //js

What I am asking you, please, is to add to my code your improvements, so my ad blocker will be more and better at blocking ads. I know that there are lot of free ad blockers, but they are heavy, they hurt the performance of my browser. That's why I dedicated myself to make my own ad blocker. My ad blocker doesn't need to block 100% of the ads. The important thing is to keep it simple, and it will be enough if blocks 75% of the most common ads.

I hope you can help me. Thank you very much in advance!

yobukodori commented 1 year ago

Thanks for continuing to use this add-on. Of course I continue to use it too.

I don't think it is practical to try to create an ad blocker with a Script-for-Me userscript, even if you only need to block 75% of the ads.

Unfortunately, I cannot advise you on the entire ad blocker you create. If you have a specific question, such as this code does not work as expected, or what code is needed to block this ad, please post it in this issue. I will do my best to answer them.

Also, the script on pastbin is broken. It cannot be run due to a syntax error.