-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script to generate css commons automatically #745
Comments
That would be indeed a good idea! About the programming language, I would of chosen nodejs for the simplicity for this, since you can just import the rules.js so it doesn't require parsing. but any language should work, but even a shell script should work since it doesn't have to run that often so yeah 👍 Oh and in my opinion it's if it's more than 4/5 it can be a common |
Hey, I wrote the script, you can find it at: https://github.com/appeasementPolitik/ruleclean I've also made a branch with the changes this script would make at: https://github.com/appeasementPolitik/I-Dont-Care-About-Cookies/tree/clean-rules It's not ready to be merged, as it's just a showcase and can be improved (some commons could be merged for example) |
I've now cleaned up the commons as well, so now the only thing left is checking if nothing went wrong during the cleaning. Also something I've realized, this script can very easily be modified to make uBlock Origin filters with the rules, like what existed in the original IDCAC. I'm not sure if it's a good idea, but it might be something interesting to look at as well. |
Oh this seems to be quite nice, and good job implementing it in nodejs 😄 |
Thank you, it was fun to practice with javascript again |
Hey, I had an idea which I have been working on a little. What about a script that can automatically check the amount of duplicate css rules, and automatically generates a commons list based on the values with the most duplicates and also changes the affected rules. Is something like this interesting?
If so, is there a specific programming language I should use? For now I managed to generate a list of all css values (including commons) and the amount of their occurences using shell script, but I'm open to implement it in another language if this is more usable.
Also, should only the 100 css rules with the most usage be used like it's currently done or more? In theory every value that is used at least twice could have a commons, but I'm not sure if this is desirable.
The text was updated successfully, but these errors were encountered: